Skip to content

Commit 4ebe835

Browse files
authored
Merge pull request #1078 from redian/master
Update production-build.md (#1)
2 parents fcc56ef + a22e518 commit 4ebe835

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/guides/production-build.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ contributors:
1010
- chrisVillanueva
1111
- swapnilmishra
1212
- bring2dip
13+
- redian
1314
---
1415

1516
This page explains how to generate production builds with webpack.
@@ -144,8 +145,8 @@ And from our package.json, where we build our application using webpack, the com
144145
"build:dist": "webpack --env=prod --progress --profile --colors",
145146
```
146147

147-
You could see that we passed the environment variable to our webpack.config.js file. From there we used a simple
148-
switch-case to build for the environment we passed by simply loading the right js file.
148+
You can see that we passed the environment variable to our webpack.config.js file.
149+
The environment variable is then passed to `buildConfig` method which simply loads the right js file for the build.
149150

150151
An advanced approach would be to have a base configuration file, put in all common functionalities,
151152
and then have environment specific files and simply use 'webpack-merge' to merge them. This would help to avoid code repetitions.

0 commit comments

Comments
 (0)