Files
nebula.js/commands/build/lib/systemjs.js
Li Kang 557ba4623e feat: to be able to disable systemjs in build (#1230)
* feat: to be able to disable systemjs in build

* refactor: rename
2023-04-21 09:35:28 +02:00

13 lines
450 B
JavaScript

const systemjsBehaviours = {
getExternal: ({ config: cfg }) => {
const defaultExternal = ['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q', 'react', 'react-dom'];
const { external } = cfg.systemjs || {};
return Array.isArray(external) ? external : defaultExternal;
},
getOutputFile: ({ pkg }) => pkg.systemjs,
getOutputName: () => undefined,
enabled: ({ pkg }) => !!pkg.systemjs,
};
module.exports = systemjsBehaviours;