Skip to content

Commit

Permalink
fix(umd): now correctly use production string for UMD bundles
Browse files Browse the repository at this point in the history
At the time of fixing this...

```sh
yarn dev-utils libsize

The gizipped UMD bundle sizes are:
 - dist/umd/react-md.production.min.js 82.51 KB (- 1.63 KB)
 - dist/umd/react-md-with-font-icons.production.min.js 106.63 KB (- 1.53 KB)
 - dist/umd/react-md-with-svg-icons.production.min.js 172.64 KB (- 1.59 KB)
```
  • Loading branch information
mlaursen committed Mar 5, 2021
1 parent d3d122a commit a9b78ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function createConfig(type) {
resolve(),
commonjs(),
replace({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.NODE_ENV': JSON.stringify('production'),
}),
],
};
Expand Down

1 comment on commit a9b78ad

@mlaursen
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A side effect of this is that the development UMD bundle won't log PropType warnings, but I think the UMD usage is pretty much non-existant anyways... I could fix it by using multiple rollup configs, but I'll wait until a bug is actually reported about this.

Please sign in to comment.