faster in node.js environment
parent
a73b1e68bc
commit
76e84c2a86
8
index.js
8
index.js
|
@ -4,10 +4,10 @@
|
|||
*/
|
||||
var path = require("path");
|
||||
module.exports = function(content) {
|
||||
var options = this;
|
||||
var result = [];
|
||||
var loaderSign = this.request.indexOf("!");
|
||||
var rawCss = this.request.substr(loaderSign); // including leading "!"
|
||||
return "require(" + JSON.stringify(path.join(__dirname, "addStyle")) + ")"+
|
||||
"(require(" + JSON.stringify(rawCss) + "))";
|
||||
if(this.web)
|
||||
return "require(" + JSON.stringify(path.join(__dirname, "addStyle")) + ")"+
|
||||
"(require(" + JSON.stringify(rawCss) + "))";
|
||||
return "";
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "style-loader",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"author": "Tobias Koppers @sokra",
|
||||
"description": "style loader module for webpack",
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in New Issue