mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
31 lines
890 B
JavaScript
31 lines
890 B
JavaScript
import { createRequire } from 'node:module';
|
|
|
|
const require$1 = createRequire(import.meta.url);
|
|
const src = require$1.resolve('./heartbeat');
|
|
const heartbeatPlugin = () => {
|
|
return {
|
|
name: 'heartbeat',
|
|
apply: 'serve', // Only apply this plugin for the dev server only
|
|
transformIndexHtml(html) {
|
|
return {
|
|
html,
|
|
tags: [
|
|
{
|
|
tag: 'script',
|
|
attrs: {
|
|
type: 'module',
|
|
src: src,
|
|
},
|
|
injectTo: 'head',
|
|
},
|
|
],
|
|
};
|
|
},
|
|
};
|
|
};
|
|
// Backward compatibility alias
|
|
const runtimeTelemetryPlugin = heartbeatPlugin;
|
|
|
|
export { heartbeatPlugin, runtimeTelemetryPlugin };
|
|
//# sourceMappingURL=heartbeatPlugin.js.map
|