Skip to content

Commit

Permalink
refactor(react): revert rollup ESM and CJS entrypoints (#5444)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Feb 26, 2020
1 parent 550bc70 commit 2b447c0
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions packages/react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,25 @@ const umdBundleConfig = {
};

module.exports = [
// TODO: update configuration to correctly support tree-shaking for React
// components. See:
// https://github.com/carbon-design-system/carbon/issues/5442
// Generates the following bundles:
// ESM: es/index.js
// CommonJS: lib/index.js
{
...baseConfig,
plugins: [
...baseConfig.plugins,
replace({
'process.env.NODE_ENV': JSON.stringify('development'),
}),
],
output: [
{
format: 'esm',
file: 'es/index.js',
},
{
format: 'cjs',
file: 'lib/index.js',
},
],
},
// {
// ...baseConfig,
// output: [
// {
// format: 'esm',
// file: 'es/index.js',
// },
// {
// format: 'cjs',
// file: 'lib/index.js',
// },
// ],
// },

// Generate the development UMD bundle:
// UMD: umd/carbon-components-react.js
Expand Down

0 comments on commit 2b447c0

Please sign in to comment.