@@ -23,8 +23,6 @@ const publicPath = paths.servedPath;
23
23
// Some apps do not use client-side routing with pushState.
24
24
// For these, "homepage" can be set to "." to enable relative asset paths.
25
25
const shouldUseRelativeAssetPaths = publicPath === './' ;
26
- // Source maps are resource heavy and can cause out of memory issue for large source files.
27
- const shouldUseSourceMap = process . env . GENERATE_SOURCEMAP !== 'false' ;
28
26
// `publicUrl` is just like `publicPath`, but we will provide it to our app
29
27
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
30
28
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
@@ -39,7 +37,7 @@ if (env.stringified['process.env'].NODE_ENV !== '"production"') {
39
37
}
40
38
41
39
// Note: defined here because it will be used more than once.
42
- const cssFilename = 'static/css/[name].[contenthash:8] .css' ;
40
+ const cssFilename = 'styles .css' ;
43
41
44
42
// ExtractTextPlugin expects the build output to be flat.
45
43
// (See https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27)
@@ -81,13 +79,13 @@ module.exports = {
81
79
bail : true ,
82
80
// We generate sourcemaps in production. This is slow but gives good results.
83
81
// You can exclude the *.map files from the build during deployment.
84
- devtool : shouldUseSourceMap ? 'source-map' : false ,
82
+ devtool : false ,
85
83
// In production, we only want to load the polyfills and the app code.
86
84
entry : [ paths . appIndexJs ] ,
87
85
target : 'node' ,
88
86
output : {
89
87
// The build folder.
90
- path : paths . appBuild ,
88
+ path : paths . appLib ,
91
89
// Generated JS file names (with nested folders).
92
90
// There will be one main bundle, and one file per asynchronous chunk.
93
91
// We don't currently advertise code splitting but Webpack supports it.
@@ -184,7 +182,7 @@ module.exports = {
184
182
loader : require . resolve ( 'url-loader' ) ,
185
183
options : {
186
184
limit : 10000 ,
187
- name : 'static/ media/[name].[hash:8].[ext]' ,
185
+ name : 'media/[name].[hash:8].[ext]' ,
188
186
} ,
189
187
} ,
190
188
// Process JS with Babel.
@@ -223,7 +221,6 @@ module.exports = {
223
221
options : {
224
222
importLoaders : 1 ,
225
223
minimize : true ,
226
- sourceMap : shouldUseSourceMap ,
227
224
} ,
228
225
} ,
229
226
{
@@ -275,7 +272,7 @@ module.exports = {
275
272
// by webpacks internal loaders.
276
273
exclude : [ / \. ( j s | j s x | m j s ) $ / , / \. h t m l $ / , / \. j s o n $ / ] ,
277
274
options : {
278
- name : 'static/ media/[name].[hash:8].[ext]' ,
275
+ name : 'media/[name].[hash:8].[ext]' ,
279
276
} ,
280
277
} ,
281
278
// ** STOP ** Are you adding a new loader?
0 commit comments