Skip to content

Instantly share code, notes, and snippets.

@zecuria
Created April 24, 2018 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zecuria/d0cf1c2787631d2d455a7fbc9cf504f1 to your computer and use it in GitHub Desktop.
Save zecuria/d0cf1c2787631d2d455a7fbc9cf504f1 to your computer and use it in GitHub Desktop.
Wepback No Source Mapping
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",
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: '[file].map',
moduleFilenameTemplate: undefined,
fallbackModuleFilenameTemplate: undefined,
append: null,
module: true,
columns: true,
lineToLine: false,
noSources: false,
namespace: ''
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment