script-loader
Advanced tools
Comparing version 0.2.0 to 0.3.0
12
index.js
@@ -6,13 +6,11 @@ /* | ||
var path = require("path"); | ||
var loaderUtils = require("loader-utils"); | ||
module.exports = function(content) { | ||
this.cacheable && this.cacheable(); | ||
this.clearDependencies && this.clearDependencies(); | ||
var loaderSign = this.request.indexOf("!"); | ||
var rawJs = this.request.substr(loaderSign); // including leading "!" | ||
if(this.web) | ||
return "require(" + JSON.stringify(path.join(__dirname, "addScript")) + ")"+ | ||
"(require(" + | ||
JSON.stringify("raw" + rawJs) + "))"; | ||
return ""; | ||
var rawJs = loaderUtils.getRemainingRequest(this); | ||
return "require(" + JSON.stringify(path.join(__dirname, "addScript" + (this.web ? ".web" : "") + ".js")) + ")"+ | ||
"(require(" + | ||
JSON.stringify("raw" + rawJs) + "))"; | ||
} | ||
module.exports.seperable = true; |
{ | ||
"name": "script-loader", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"author": "Tobias Koppers @sokra", | ||
"description": "script loader module for webpack", | ||
"dependencies": { | ||
"raw-loader": "0.1.x" | ||
"raw-loader": "0.1.x", | ||
"loader-utils": "0.1.x" | ||
}, | ||
@@ -9,0 +10,0 @@ "licenses": [ |
1428
2
23
+ Addedloader-utils@0.1.x
+ Addedjson5@0.1.0(transitive)
+ Addedloader-utils@0.1.2(transitive)