css-hot-loader
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -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 @@ |
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130
12900
128