Socket
Socket
Sign inDemoInstall

css-hot-loader

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-hot-loader - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

4

History.md

@@ -0,1 +1,5 @@

### 1.4.4 2019-03-13
- fix: replace DOM api remove to removeChild, support ie [!57](https://github.com/shepherdwind/css-hot-loader/pull/57)
### 1.4.3 2018-12-12

@@ -2,0 +6,0 @@

7

hotModuleReplacement.js

@@ -57,7 +57,10 @@ var normalizeUrl = require('normalize-url');

newEl.isLoaded = true;
el.remove();
newEl.parentNode.removeChild(el);
});
newEl.addEventListener('error', function () {
newEl.isLoaded = true;
el.remove();
if (newEl.parentNode.contains(el)) {
newEl.parentNode.removeChild(el);
}
});

@@ -64,0 +67,0 @@

{
"name": "css-hot-loader",
"version": "1.4.3",
"version": "1.4.4",
"description": "css hot reload work with extract-text-webpack-plugin",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -42,13 +42,15 @@ ### CSS Hot Loader

{
test: /\.css$/,
use: ['css-hot-loader'].concat(ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
})),
test: /\.css/,
use: [
'css-hot-loader',
MiniCssExtractPlugin.loader,
'css-loader',
],
},
]
}
] // end rules
},
```
`css-hot-loader` should be the first loader before `extract-text-webpack-plugin`.
There is an issue to work with webpack4 [#37](https://github.com/shepherdwind/css-hot-loader/issues/37).
Please use [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to replace extract-text-webpack-plugin.

@@ -61,23 +63,3 @@ ### Attention

### webpack 4
There is an issue to work with webpack4 [#37](https://github.com/shepherdwind/css-hot-loader/issues/37).
Please use [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to replace extract-text-webpack-plugin.
Config like this:
```javascript
module: {
rules: [
{
test: /\.css/,
use: [
'css-hot-loader',
MiniCssExtractPlugin.loader,
'css-loader',
],
},
] // end rules
},
```
### webpack 1.x

@@ -102,2 +84,4 @@

See more examples code from https://github.com/shepherdwind/css-hot-loader/tree/v1.4.3/examples
### options

@@ -104,0 +88,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc