mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 23:44:08 +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: {
|
||||
external(id) {
|
||||
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;
|
||||
},
|
||||
external: ['prism'],
|
||||
output: {
|
||||
interop: 'auto',
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user