style-loader
Advanced tools
Comparing version 0.20.0 to 0.20.1
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="0.20.1"></a> | ||
## [0.20.1](https://github.com/webpack-contrib/style-loader/compare/v0.20.0...v0.20.1) (2018-01-26) | ||
### Bug Fixes | ||
* **index:** source code indentation ([#299](https://github.com/webpack-contrib/style-loader/issues/299)) ([b4642e7](https://github.com/webpack-contrib/style-loader/commit/b4642e7)) | ||
<a name="0.20.0"></a> | ||
@@ -7,0 +17,0 @@ # [0.20.0](https://github.com/webpack-contrib/style-loader/compare/v0.19.1...v0.20.0) (2018-01-26) |
24
index.js
@@ -18,18 +18,18 @@ /* | ||
validateOptions(require('./options.json'), options, 'Style Loader') | ||
options.hmr = typeof options.hmr === 'undefined' ? true : options.hmr; | ||
// The variable is needed, because the function should be inlined. | ||
// 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(); | ||
if (typeof options.insertInto === "function") { | ||
insertInto = options.insertInto.toString(); | ||
} | ||
// We need to check if it a string, or variable will be "undefined" | ||
// 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 + '"'; | ||
if (typeof options.insertInto === "string") { | ||
insertInto = '"' + options.insertInto + '"'; | ||
} | ||
@@ -83,7 +83,7 @@ | ||
"", | ||
options.transform ? "transform = require(" + loaderUtils.stringifyRequest(this, "!" + path.resolve(options.transform)) + ");" : "", | ||
"", | ||
options.transform ? "transform = require(" + loaderUtils.stringifyRequest(this, "!" + path.resolve(options.transform)) + ");" : "", | ||
"", | ||
"var options = " + JSON.stringify(options), | ||
"", | ||
"options.transform = transform", | ||
"options.transform = transform", | ||
"options.insertInto = " + insertInto + ";", | ||
@@ -90,0 +90,0 @@ "", |
{ | ||
"name": "style-loader", | ||
"version": "0.20.0", | ||
"version": "0.20.1", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "style loader module for webpack", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
41708
0