Reloads stylesheets extracted with with ExtractTextPlugin
npm install extracted-loader
[npm-image]: http://img.shields.io/npm/v/extracted-loader.svg?style=flat-square
[npm-url]: http://npmjs.org/package/extracted-loader
It hotreloads extracted stylesheets extracted with ExtractTextPlugin.
No configuration needed. A better css-hot-loader.
You want to hot reload only stylesheets, not the whole page. Great for editing dynamic views.
```
npm install extracted-loader --save-dev
or
``
yarn add extracted-loader --dev
And then you can use it for example as so:
`js
config.module.rules.push({
test: /\.css$/,
use: ['extracted-loader'].concat(ExtractTextPlugin.extract({
/ Your configuration here /
}))
})
config.plugins.push(new ExtractTextPlugin('index.css'))
`
`js
config.module.rules.push({
test: /\.(sa|sc|c)ss$/,
use: ['extracted-loader'].concat(ExtractTextPlugin.extract({
use: [
"babel-loader",
{
loader: 'css-loader',
options: {
url: true,
minimize: !dev,
sourceMap: dev,
importLoaders: 2
}
},
{
loader: 'postcss-loader',
options: {
sourceMap: dev,
plugins: [
require('autoprefixer')({
/ options /
})
]
}
},
{
loader: 'sass-loader',
options: {
sourceMap: dev
}
}
]
}))
})
config.plugins.push(new ExtractTextPlugin('index.css'))
`
By reloading all relevant ` when extracted text changes.
- next.js
Yes, please
MIT