nx/packages/react/plugins/bundle-rollup.ts

13 lines
381 B
TypeScript

function getRollupOptions(options: any) {
const globals = options.output.globals || {};
globals.react = 'React';
globals['react-dom'] = 'ReactDOM';
globals['styled-components'] = 'styled';
globals['@emotion/core'] = 'emotionCore';
globals['@emotion/styled'] = 'emotionStyled';
options.output.globals = globals;
return options;
}
module.exports = getRollupOptions;