Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

style-loader

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

style-loader - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

5

addStyle.js

@@ -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";

2

package.json
{
"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)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc