faster in node.js environment

master
Tobias Koppers 2012-04-07 03:15:47 +02:00
parent a73b1e68bc
commit 76e84c2a86
2 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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": {