File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ contributors:
6
6
- rajagopal4890
7
7
- markerikson
8
8
- simon04
9
+ - kisnows
9
10
---
10
11
11
12
This page explains how to generate production builds with webpack.
@@ -76,6 +77,7 @@ each environment. For example:
76
77
** dev.js **
77
78
``` js
78
79
module .exports = function (env ) {
80
+ return {
79
81
devtool: ' cheap-module-source-map' ,
80
82
output: {
81
83
path: path .join (__dirname , ' /../dist/assets' ),
@@ -91,12 +93,14 @@ module.exports = function (env) {
91
93
stats: ' minimal' ,
92
94
publicPath: publicPath
93
95
}
96
+ }
94
97
}
95
98
```
96
99
97
100
** prod.js **
98
101
``` js
99
102
module .exports = function (env ) {
103
+ return {
100
104
output: {
101
105
path: path .join (__dirname , ' /../dist/assets' ),
102
106
filename: ' [name].bundle.js' ,
@@ -120,6 +124,7 @@ module.exports = function (env) {
120
124
comments: false
121
125
})
122
126
]
127
+ }
123
128
}
124
129
```
125
130
Have the following snippet in our webpack.config.js:
You can’t perform that action at this time.
0 commit comments