Socket
Socket
Sign inDemoInstall

style-loader

Package Overview
Dependencies
0
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.2 to 0.6.0

6

addStyle.js

@@ -13,3 +13,7 @@ /*

}
document.getElementsByTagName("head")[0].appendChild(styleElement);
var head = document.getElementsByTagName("head")[0];
head.appendChild(styleElement);
return function() {
head.removeChild(styleElement);
};
}

@@ -10,3 +10,7 @@ /*

styleElement.href = cssUrl;
document.getElementsByTagName("head")[0].appendChild(styleElement);
var head = document.getElementsByTagName("head")[0];
head.appendChild(styleElement);
return function() {
head.removeChild(styleElement);
};
}

6

index.js

@@ -10,7 +10,9 @@ /*

var comment1 = "// style-loader: Adds some css to the DOM by adding a <style> tag\n";
var addStyleCode = "require(" + JSON.stringify("!" + path.join(__dirname, "addStyle.js")) + ")\n";
var addStyleCode = "var dispose = require(" + JSON.stringify("!" + path.join(__dirname, "addStyle.js")) + ")\n";
var comment2 = "\t// The css code:\n";
var cssCodeRequest = "require(" + JSON.stringify("!!" + remainingRequest) + ")";
return comment1 + addStyleCode + comment2 + "\t(" + cssCodeRequest + ")";
var comment3 = "// Hot Module Replacement\n";
var hmrCode = "if(module.hot) {\n\tmodule.hot.accept();\n\tmodule.hot.dispose(dispose);\n}";
return comment1 + addStyleCode + comment2 + "\t(" + cssCodeRequest + ")\n" + hmrCode;
};
module.exports.seperable = true;
{
"name": "style-loader",
"version": "0.5.2",
"version": "0.6.0",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "style loader module for webpack",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc