Skip to content

Instantly share code, notes, and snippets.

@Jahans3
Created March 20, 2018 21:24
Show Gist options
  • Save Jahans3/49dd2b312e17843a12cf9ec22f9b64cb to your computer and use it in GitHub Desktop.
Save Jahans3/49dd2b312e17843a12cf9ec22f9b64cb to your computer and use it in GitHub Desktop.
const webpack = require('webpack')
module.exports = config => Object.assign({}, {
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
'sass-loader'
]
}
]
},
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: 'bundle.js.map'
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development')
})
]
}, config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment