[release-12.1.2] Fix: Prevent Rollup from treeshaking NPM packages (#108570)
Fix: Prevent Rollup from treeshaking NPM packages (#108567)
fix(packages): prevent rollup from treeshaking libraries
(cherry picked from commit 15d9df93f9)
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
This commit is contained in:
co-authored by
Jack Westbrook
parent
fb80e2d4bf
commit
52ecba092c
@@ -10,10 +10,12 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-alerting')],
|
||||
treeshake: false,
|
||||
},
|
||||
{
|
||||
input: 'src/unstable.ts',
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-alerting')],
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -10,10 +10,12 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-data')],
|
||||
treeshake: false,
|
||||
},
|
||||
{
|
||||
input: 'src/unstable.ts',
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-data')],
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -10,5 +10,6 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-e2e-selectors')],
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -10,5 +10,6 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-flamegraph')],
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -16,5 +16,6 @@ export default [
|
||||
}),
|
||||
],
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-i18n')],
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -13,5 +13,6 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins: [...plugins, image(), json(), dynamicImportVars()],
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-prometheus')],
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -10,10 +10,12 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-runtime')],
|
||||
treeshake: false,
|
||||
},
|
||||
{
|
||||
input: 'src/unstable.ts',
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-runtime')],
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -16,6 +16,7 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-schema')],
|
||||
treeshake: false,
|
||||
},
|
||||
{
|
||||
input: Object.fromEntries(
|
||||
@@ -45,5 +46,6 @@ export default [
|
||||
format: 'esm',
|
||||
dir: path.dirname(pkg.publishConfig.module),
|
||||
},
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -25,6 +25,7 @@ export default [
|
||||
}),
|
||||
],
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-ui')],
|
||||
treeshake: false,
|
||||
},
|
||||
{
|
||||
input: 'src/unstable.ts',
|
||||
@@ -37,5 +38,6 @@ export default [
|
||||
}),
|
||||
],
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-ui')],
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user