0.0.5 • Published 6 years ago

extract-css-hmr v0.0.5

Weekly downloads
18
License
-
Repository
-
Last release
6 years ago

extract-css-hmr

This is a node module which exposes a webpack loader and plugin to extract css from hot module reloads.

Problem

You are trying to hot reload css server side and you use ExtractTextWebpackPLugin.

Solution

Use ExtractTextWebpackPLugin for production and ExtractCssHMR (this module) for development.

Install

  npm install extract-css-hmr --save-dev

Config

Add the loader and plugin to you webpack config.

  module: {
    rules: [{
      test: /\.scss$/,
      use: [
        'style-loader',
        'css-loader',
        'extract-css-hmr/loader',
        'sass-loader'
      ]
    }]
  },
  plugins: [
    new ExtractCssHmrPlugin({
      filename: '[name]-[hash].css'
    })
  ]
``
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago