Socket
Socket
Sign inDemoInstall

style-loader

Package Overview
Dependencies
13
Maintainers
10
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.22.1 to 0.23.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="0.23.0"></a>
# [0.23.0](https://github.com/webpack-contrib/style-loader/compare/v0.22.1...v0.23.0) (2018-08-27)
### Features
* **useable:** add `insertInto` support (`options.insertInto`) ([#341](https://github.com/webpack-contrib/style-loader/issues/341)) ([2588aca](https://github.com/webpack-contrib/style-loader/commit/2588aca))
<a name="0.22.1"></a>

@@ -7,0 +17,0 @@ ## [0.22.1](https://github.com/webpack-contrib/style-loader/compare/v0.22.0...v0.22.1) (2018-08-08)

2

package.json
{
"name": "style-loader",
"version": "0.22.1",
"version": "0.23.0",
"author": "Tobias Koppers @sokra",

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

@@ -21,2 +21,17 @@ /*

// The variable is needed, because the function should be inlined.
// If is just stored it in options, JSON.stringify will quote
// the function and it would be just a string at runtime
var insertInto;
if (typeof options.insertInto === "function") {
insertInto = options.insertInto.toString();
}
// We need to check if it a string, or variable will be "undefined"
// and the loader crashes
if (typeof options.insertInto === "string") {
insertInto = '"' + options.insertInto + '"';
}
var hmr = [

@@ -52,2 +67,4 @@ // Hot Module Replacement

"var content = require(" + loaderUtils.stringifyRequest(this, "!!" + request) + ");",
"var options = " + JSON.stringify(options) + ";",
"options.insertInto = " + insertInto + ";",
"",

@@ -60,3 +77,3 @@ "if(typeof content === 'string') content = [[module.id, content, '']];",

" if(!(refs++)) {",
" dispose = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, " + JSON.stringify(options) + ");",
" dispose = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, options);",
" }",

@@ -63,0 +80,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