Files
low-code-react-app-b/packages/spark-tools/dist/heartbeatPlugin.js
2026-01-17 22:16:42 +00:00

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