Skip to content

Commit

Permalink
refactor(react): revert rollup ESM and CJS entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack committed Feb 25, 2020
1 parent 7599426 commit b7c4b7f
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 b7c4b7f

Please sign in to comment.