I'm having trouble compiling sass and jade.
Although I found an option for sass, it only compiles at startup and doesn't work properly.
Here are the commands I've tried:
- webpack-dev-server --watch-poll
- webpack-dev-server
- --watch webpack-dev-server
However, it seems to compile only after running this command:
- webpack
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/',
sourceMapFilename: '[name].map'
},
devtool: "source-map",
devServer: {
hot: true, // Tell the dev-server we're using HMR
contentBase: path.resolve(__dirname, 'dist'),
publicPath: '/'
},
module: {
loaders: [
{
test: /\.css$/,
loader: "style-loader!css-loader"
}, {
test: /\.sass$/,
loaders: ['style-loader', 'css-loader', 'sass-loader']
}
]
}
};
What steps should I take to resolve this issue?