I am looking to hot reload my window when I save a stylesheet in my text editor. Currently, I have to manually reload the page to see any changes. Below is the snippet in my Webpack configuration file that handles processing css:
module: {
rules: [
{
test: /\.js$/,
exclude: path.resolve(__dirname, 'node_modules'),
loader: 'babel-loader',
},
{
test: /\.css$/,
include: [`${PATHS.src}`, `${PATHS.modules}/normalize.css/normalize.css`],
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]___[hash:base64:5]',
importLoaders: 1,
},
},
'postcss-loader',
],
}),
},
],
}
I am using Webpack 3, Webpack Dev Server and PostCSS along with the Extract Text Plugin. Thanks!