-
Robert Knight authored
Packages in the React ecosystem often include debugging checks guarded by: ``` if (process.env.NODE_ENV === 'development') { ... } ``` OR ``` if (process.env.NODE_ENV !== 'production') { ... } ``` This commit uses loose-envify to replace the `process.env.$VAR` expression with a literal string value when building JS bundles. This enables debugging checks in dev builds and causes the minifier to remove the code entirely in production builds. Some packages don't need this because their package.json file includes a "browserify" key which already configures this transform, however not all of them do. Therefore the transform is configured to run globally.
f5d81fd0
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
create-bundle.js | ||
create-server.js | ||
live-reload-server.js | ||
manifest.js | ||
serve-package.js | ||
upload-to-sentry.js | ||
vendor-bundles.js |