mirror of
https://github.com/strapi/strapi.git
synced 2025-12-16 17:53:53 +00:00
feat(content-manager): change rollup options
This commit is contained in:
parent
429b505481
commit
9fcfd16bb7
@ -29,30 +29,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external(id) {
|
external: ['prism'],
|
||||||
const external = [
|
|
||||||
...(pkg.dependencies ? Object.keys(pkg.dependencies) : []),
|
|
||||||
...(pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : []),
|
|
||||||
];
|
|
||||||
|
|
||||||
const idParts = id.split('/');
|
|
||||||
|
|
||||||
const name = idParts[0].startsWith('@') ? `${idParts[0]}/${idParts[1]}` : idParts[0];
|
|
||||||
|
|
||||||
const builtinModulesWithNodePrefix = [
|
|
||||||
...builtinModules,
|
|
||||||
...builtinModules.map((modName) => `node:${modName}`),
|
|
||||||
];
|
|
||||||
|
|
||||||
if (
|
|
||||||
(name && external.includes(name)) ||
|
|
||||||
(name && builtinModulesWithNodePrefix.includes(name))
|
|
||||||
) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
interop: 'auto',
|
interop: 'auto',
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user