Skip to content

Commit 75318d1

Browse files
committed
devtool value based on NODE_ENV env feature added. Fetching NODE_ENV env var's value bug fixed
1 parent 7cd45d1 commit 75318d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

webpack.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ const ENTRY_POINTS = [ './src/index' ];
55
const DEV_ENTRY_POINTS = ENTRY_POINTS.concat( [ 'webpack-hot-middleware/client' ] );
66

77
module.exports = {
8-
devtool: 'cheap-module-eval-source-map',
9-
entry: process.NODE_ENV === 'production' ? ENTRY_POINTS : DEV_ENTRY_POINTS,
8+
devtool: process.env.NODE_ENV === 'production' ? 'cheap-source-map' : 'cheap-module-eval-source-map',
9+
entry: process.env.NODE_ENV === 'production' ? ENTRY_POINTS : DEV_ENTRY_POINTS,
1010
output: {
1111
path: path.join(__dirname, 'dist'),
1212
filename: 'bundle.js',
13+
sourceMapFilename: 'bundle.map.js',
1314
publicPath: '/'
1415
},
1516
plugins: [

0 commit comments

Comments
 (0)