Created
August 24, 2017 12:05
-
-
Save jinglemansweep/206e82389b848a325db7ef829ae1b220 to your computer and use it in GitHub Desktop.
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
const webpack = require('webpack'); | |
const Merge = require('webpack-merge'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const CommonConfig = require('./webpack.common.js'); | |
module.exports = Merge(CommonConfig, { | |
module: { | |
rules: [ | |
{ | |
test: /\.scss$/, | |
use: ExtractTextPlugin.extract({ | |
fallback: 'style-loader', | |
use: ['css-loader', 'sass-loader'] | |
}) | |
} | |
] | |
}, | |
plugins: [ | |
new ExtractTextPlugin({ | |
filename: '[name].bundle.css', | |
allChunks: true | |
}), | |
new webpack.optimize.UglifyJsPlugin({}) | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment