Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.1.1 to 1.2.0-beta

19

hotModuleReplacement.js

@@ -29,2 +29,14 @@ var normalizeUrl = require('normalize-url');

function updateCss(el, url) {
var newEl = el.cloneNode();
if (!url) {
url = el.href.split('?')[0];
}
newEl.addEventListener('load', function () {
el.remove();
});
newEl.href = url + '?' + Date.now();
el.parentNode.insertBefore(newEl, el.nextSibling);
}
function reloadStyle(src) {

@@ -36,3 +48,3 @@ var elements = document.querySelectorAll('link');

if (url) {
el.href = url + '?' + Date.now();
updateCss(el, url);
loaded = true;

@@ -58,4 +70,3 @@ }

for (var i = 0, el = null; el = elements[i]; i++) {
var src = el.href.split('?')[0];
el.href = src + '?' + Date.now();
updateCss(el);
}

@@ -75,3 +86,3 @@ }

} else {
console.log('[HMR] css reload all css');
console.log('[HMR] Reload all css');
reloadAll();

@@ -78,0 +89,0 @@ }

{
"name": "css-hot-loader",
"version": "1.1.1",
"version": "1.2.0-beta",
"description": "css hot reload work with extract-text-webpack-plugin",

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

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