Socket
Socket
Sign inDemoInstall

style-loader

Package Overview
Dependencies
5
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.10.2 to 0.11.0

13

index.js

@@ -19,10 +19,13 @@ /*

"var update = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "addStyles.js")) + ")(content, " + JSON.stringify(query) + ");",
"if(content.placeholders) module.exports = content.placeholders;",
"// Hot Module Replacement",
"if(module.hot) {",
" // When the styles change, update the <style> tags",
" module.hot.accept(" + loaderUtils.stringifyRequest(this, "!!" + remainingRequest) + ", function() {",
" var newContent = require(" + loaderUtils.stringifyRequest(this, "!!" + remainingRequest) + ");",
" if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];",
" update(newContent);",
" });",
" if(!content.placeholders) {",
" module.hot.accept(" + loaderUtils.stringifyRequest(this, "!!" + remainingRequest) + ", function() {",
" var newContent = require(" + loaderUtils.stringifyRequest(this, "!!" + remainingRequest) + ");",
" if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];",
" update(newContent);",
" });",
" }",
" // When the module is disposed, remove the <style> tags",

@@ -29,0 +32,0 @@ " module.hot.dispose(function() { update(); });",

{
"name": "style-loader",
"version": "0.10.2",
"version": "0.11.0",
"author": "Tobias Koppers @sokra",

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

@@ -23,2 +23,13 @@ # style loader for webpack

### Placeholders
(experimental)
When using placeholders (see css-loader) the module exports the placeholders object:
``` js
var styles = require("style!css!./file.css");
style.placeholder1 === "z849f98ca812bc0d099a43e0f90184"
```
### Reference-counted API

@@ -25,0 +36,0 @@

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