[release-12.0.5] Fix: Prevent Rollup from treeshaking NPM packages (#110523)
Fix: Prevent Rollup from treeshaking NPM packages (#108567)
fix(packages): prevent rollup from treeshaking libraries
(cherry picked from commit 15d9df93f9)
This commit is contained in:
@@ -10,11 +10,13 @@ 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,
|
||||
},
|
||||
tsDeclarationOutput(pkg),
|
||||
tsDeclarationOutput(pkg, {
|
||||
|
||||
@@ -10,6 +10,7 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-e2e-selectors')],
|
||||
treeshake: false,
|
||||
},
|
||||
tsDeclarationOutput(pkg),
|
||||
];
|
||||
|
||||
@@ -10,6 +10,7 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-flamegraph')],
|
||||
treeshake: false,
|
||||
},
|
||||
tsDeclarationOutput(pkg),
|
||||
];
|
||||
|
||||
@@ -11,6 +11,7 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins: [...plugins, image()],
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-prometheus')],
|
||||
treeshake: false,
|
||||
},
|
||||
tsDeclarationOutput(pkg),
|
||||
];
|
||||
|
||||
@@ -10,11 +10,13 @@ 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,
|
||||
},
|
||||
tsDeclarationOutput(pkg),
|
||||
tsDeclarationOutput(pkg, {
|
||||
|
||||
@@ -15,6 +15,7 @@ export default [
|
||||
input: entryPoint,
|
||||
plugins,
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-schema')],
|
||||
treeshake: false,
|
||||
},
|
||||
tsDeclarationOutput(pkg, { input: './dist/esm/index.d.ts' }),
|
||||
{
|
||||
@@ -31,5 +32,6 @@ export default [
|
||||
format: 'esm',
|
||||
dir: path.dirname(pkg.publishConfig.module),
|
||||
},
|
||||
treeshake: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -24,6 +24,7 @@ export default [
|
||||
}),
|
||||
],
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-ui')],
|
||||
treeshake: false,
|
||||
},
|
||||
{
|
||||
input: 'src/unstable.ts',
|
||||
@@ -36,6 +37,7 @@ export default [
|
||||
}),
|
||||
],
|
||||
output: [cjsOutput(pkg), esmOutput(pkg, 'grafana-ui')],
|
||||
treeshake: false,
|
||||
},
|
||||
tsDeclarationOutput(pkg),
|
||||
tsDeclarationOutput(pkg, {
|
||||
|
||||
Reference in New Issue
Block a user