style-loader
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -5,3 +5,6 @@ /* | ||
*/ | ||
module.exports = function(cssCode) { | ||
module.exports = function addStyle(cssCode) { | ||
if(typeof DEBUG !== "undefined" && DEBUG) { | ||
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); | ||
} | ||
var styleElement = document.createElement("style"); | ||
@@ -8,0 +11,0 @@ styleElement.type = "text/css"; |
@@ -5,3 +5,6 @@ /* | ||
*/ | ||
module.exports = function(cssUrl) { | ||
module.exports = function addStyleUrl(cssUrl) { | ||
if(typeof DEBUG !== "undefined" && DEBUG) { | ||
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); | ||
} | ||
var styleElement = document.createElement("link"); | ||
@@ -8,0 +11,0 @@ styleElement.rel = "stylesheet"; |
{ | ||
"name": "style-loader", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "style loader module for webpack", |
@@ -33,4 +33,21 @@ # style loader for webpack | ||
## Recommended configuration | ||
By convention the reference-counted API should be bound to `.useable.css` and the simple API to `.css` (similar to other file types, i. e. `.useable.less` and `.less`). | ||
So the recommended configuration for webpack is: | ||
``` javascript | ||
{ | ||
module: { | ||
loaders: [ | ||
{ test: /\.css$/, exclude: /\.useable\.css$/, loader: "style!css" }, | ||
{ test: /\.useable\.css$/, loader: "style/useable!css" } | ||
] | ||
} | ||
} | ||
``` | ||
## License | ||
MIT (http://www.opensource.org/licenses/mit-license.php) | ||
MIT (http://www.opensource.org/licenses/mit-license.php) |
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
5663
106
53