Skip to content

Instantly share code, notes, and snippets.

@stecb
Created April 25, 2018 10:53
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 stecb/fe3c410dd5393febee9c5feb7b1cbecf to your computer and use it in GitHub Desktop.
Save stecb/fe3c410dd5393febee9c5feb7b1cbecf to your computer and use it in GitHub Desktop.
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
module.exports = {
optimization: {
minimizer: [
new OptimizeCSSAssetsPlugin({})
]
},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css"
})
],
module: {
rules: [
{
test: /\.s?[ac]ss$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader',
'sass-loader',
],
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment