Skip to content

Instantly share code, notes, and snippets.

@jinglemansweep
Created August 24, 2017 12:05
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 jinglemansweep/206e82389b848a325db7ef829ae1b220 to your computer and use it in GitHub Desktop.
Save jinglemansweep/206e82389b848a325db7ef829ae1b220 to your computer and use it in GitHub Desktop.
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