Until now, I was using gulp
to
- Look for all
scss
files in a in a source path, - Pass these files through a
gulp-sass
pipe, - Finally, set a destination where the single compiled css file is generated.
I used the final compiled css file in my html using a link
tag.
I have been unsuccessful in replicating this in webpack. I referred this loader but I can't find any option to generate a final css file in a specific location. Here's my current webpack config:
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './src/liteword.js',
output: {
path: path.resolve(__dirname, 'build'),
filename: 'liteword.bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
},
{
test: /\.scss$/,
loaders: ['style', 'css?sourceMap', 'sass?sourceMap']
}
]
},
stats: {
colors: true
},
devtool: 'source-map',
watch: true
};