Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f87873e

Browse files
author
Archie Lee
committedJan 25, 2017
Fix wrong env provieded to DefinePlugin
1 parent 6e378d4 commit f87873e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎packages/react-scripts/config/webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ module.exports = {
213213
}),
214214
// Makes some environment variables available to the JS code, for example:
215215
// if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
216-
new webpack.DefinePlugin(env['process.env']),
216+
new webpack.DefinePlugin(env),
217217
// This is necessary to emit hot updates (currently CSS only):
218218
new webpack.HotModuleReplacementPlugin(),
219219
// Watcher doesn't work well if you mistype casing in a path so we use

‎packages/react-scripts/config/webpack.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ module.exports = {
240240
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
241241
// It is absolutely essential that NODE_ENV was set to production here.
242242
// Otherwise React will be compiled in the very slow development mode.
243-
new webpack.DefinePlugin(env['process.env']),
243+
new webpack.DefinePlugin(env),
244244
// This helps ensure the builds are consistent if source hasn't changed:
245245
new webpack.optimize.OccurrenceOrderPlugin(),
246246
// Try to dedupe duplicated modules, if any:

0 commit comments

Comments
 (0)
Please sign in to comment.