@@ -17,8 +17,6 @@ const publicPath = paths.servedPath;
17
17
// Some apps do not use client-side routing with pushState.
18
18
// For these, "homepage" can be set to "." to enable relative asset paths.
19
19
const shouldUseRelativeAssetPaths = publicPath === './' ;
20
- // Source maps are resource heavy and can cause out of memory issue for large source files.
21
- const shouldUseSourceMap = process . env . GENERATE_SOURCEMAP !== 'false' ;
22
20
// `publicUrl` is just like `publicPath`, but we will provide it to our app
23
21
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
24
22
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
@@ -50,9 +48,7 @@ const extractTextPluginOptions = shouldUseRelativeAssetPaths
50
48
module . exports = {
51
49
// Don't attempt to continue if there are any errors.
52
50
bail : true ,
53
- // We generate sourcemaps in production. This is slow but gives good results.
54
- // You can exclude the *.map files from the build during deployment.
55
- devtool : shouldUseSourceMap ? 'source-map' : false ,
51
+ devtool : false ,
56
52
// In production, we only want to load the polyfills and the app code.
57
53
entry : [ require . resolve ( './polyfills' ) , paths . appIndexJs ] ,
58
54
output : {
@@ -180,7 +176,7 @@ module.exports = {
180
176
options : {
181
177
importLoaders : 1 ,
182
178
minimize : true ,
183
- sourceMap : shouldUseSourceMap ,
179
+ sourceMap : false ,
184
180
} ,
185
181
} ,
186
182
{
@@ -227,7 +223,7 @@ module.exports = {
227
223
options : {
228
224
importLoaders : 1 ,
229
225
minimize : true ,
230
- sourceMap : shouldUseSourceMap ,
226
+ sourceMap : false ,
231
227
} ,
232
228
} ,
233
229
{
@@ -308,7 +304,7 @@ module.exports = {
308
304
// https://github.com/facebookincubator/create-react-app/issues/2488
309
305
ascii_only : true ,
310
306
} ,
311
- sourceMap : shouldUseSourceMap ,
307
+ sourceMap : false ,
312
308
} ) ,
313
309
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
314
310
new ExtractTextPlugin ( {
0 commit comments