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.7.1 to 0.8.0

.npmignore

21

index.js

@@ -11,13 +11,20 @@ /*

"// style-loader: Adds some css to the DOM by adding a <style> tag",
"var update = require(" + JSON.stringify("!" + path.join(__dirname, "addStyle.js")) + ")(",
"\trequire(" + JSON.stringify("!!" + remainingRequest) + ")",
");",
"",
"// load the styles",
"var content = require(" + JSON.stringify("!!" + remainingRequest) + ");",
"if(typeof content === 'string') content = [module.id, content, ''];",
"// add the styles to the DOM",
"var update = require(" + JSON.stringify("!" + path.join(__dirname, "addStyles.js")) + ")(content);",
"// Hot Module Replacement",
"if(module.hot) {",
"\tmodule.hot.accept(" + JSON.stringify("!!" + remainingRequest) + ", function() {",
"\t\tupdate(require(" + JSON.stringify("!!" + remainingRequest) + "));",
"\t});",
"\tmodule.hot.dispose(function() { update(); });",
" // When the styles change, update the <style> tags",
" module.hot.accept(" + JSON.stringify("!!" + remainingRequest) + ", function() {",
" var newContent = require(" + JSON.stringify("!!" + remainingRequest) + ");",
" if(typeof newContent === 'string') newContent = [module.id, newContent, ''];",
" update(newContent);",
" });",
" // When the module is disposed, remove the <style> tags",
" module.hot.dispose(function() { update(); });",
"}"
].join("\n");
};
{
"name": "style-loader",
"version": "0.7.1",
"version": "0.8.0",
"author": "Tobias Koppers @sokra",
"description": "style loader module for webpack",
"devDependencies": {
"css-loader": "~0.8.0"
},
"repository": {

@@ -7,0 +10,0 @@ "type": "git",

@@ -14,3 +14,5 @@ /*

" if(!(refs++)) {",
" dispose = require(" + JSON.stringify("!" + path.join(__dirname, "addStyle.js")) + ")(require(" + JSON.stringify("!!" + remainingRequest) + "));",
" var content = require(" + JSON.stringify("!!" + remainingRequest) + ")",
" if(typeof content === 'string') content = [module.id, content, ''];",
" dispose = require(" + JSON.stringify("!" + path.join(__dirname, "addStyles.js")) + ")(content);",
" }",

@@ -17,0 +19,0 @@ " return exports",

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