Might as well keep going and add SASS in there also. Here is our config.
const style_loader = ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{ loader: 'css-loader',
options: {
sourceMap: true
}
},
{ loader: 'postcss-loader',
options: { plugins() { return [Autoprefixer]; } }
},
{ loader: 'resolve-url-loader' },
{ loader: 'sass-loader',
options: { sourceMap: true }
}
]
});
Define that above and then below in your rules you can have:
{
test: /\.scss$/,
use: style_loader
}
Then when you add your plugins:
new ExtractTextPlugin('[name].css'),
I would import one main.scss file into your whatever .js file is your entry point and then import your _partial.scss files into the main.scss file. That way you can break up your styles and start using all of the sass features also.