2025-05-09 11:45:20 +08:00
|
|
|
import { createRequire } from 'node:module';
|
2025-06-10 21:45:34 +08:00
|
|
|
import copy from 'rollup-plugin-copy';
|
2025-05-09 11:45:20 +08:00
|
|
|
|
2025-06-12 21:25:16 +08:00
|
|
|
import { entryPoint, plugins, esmOutput, cjsOutput } from '../rollup.config.parts';
|
2025-05-09 11:45:20 +08:00
|
|
|
|
|
|
|
|
const rq = createRequire(import.meta.url);
|
|
|
|
|
const pkg = rq('./package.json');
|
|
|
|
|
|
|
|
|
|
export default [
|
|
|
|
|
{
|
|
|
|
|
input: entryPoint,
|
2025-06-10 21:45:34 +08:00
|
|
|
plugins: [
|
|
|
|
|
...plugins,
|
|
|
|
|
copy({
|
|
|
|
|
targets: [{ src: 'src/eslint', dest: 'dist' }],
|
|
|
|
|
}),
|
|
|
|
|
],
|
2025-05-09 11:45:20 +08:00
|
|
|
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-i18n')],
|
2025-07-24 16:54:02 +08:00
|
|
|
treeshake: false,
|
2025-05-09 11:45:20 +08:00
|
|
|
},
|
|
|
|
|
];
|