Created
April 24, 2018 00:22
-
-
Save zecuria/23db4aea486460a04f3a505b309c8220 to your computer and use it in GitHub Desktop.
Webpack Valid Sourcemap Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: { | |
'Dashboard/index': './src/Dashboard/index.js', | |
}, | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: '[name].js', | |
}, | |
module: { | |
rules: [ | |
{ test: /\.(js)$/, use: 'babel-loader' }, | |
{ test: /\.(jsx)$/, use: 'babel-loader' } | |
] | |
}, | |
optimization: { | |
splitChunks:{ | |
cacheGroups: { | |
vendor: { | |
test: /react|react-dom|mobx|mobx-react|moment|axios/, | |
name: "vendor", | |
chunks: "all", | |
enforce: true | |
} | |
} | |
} | |
}, | |
mode: "development", | |
devtool: "source-map" | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment