Socket
Socket
Sign inDemoInstall

script-loader

Package Overview
Dependencies
1
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.1 to 0.5.0

11

addScript.js

@@ -1,1 +0,10 @@

module.exports = function() {}
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
module.exports = function(src) {
if (window.execScript)
window.execScript(src);
else
eval.call(null, src);
}

15

index.js

@@ -6,10 +6,8 @@ /*

var path = require("path");
var loaderUtils = require("loader-utils");
module.exports = function(content) {
module.exports = function() {};
module.exports.pitch = function(remainingRequest) {
this.cacheable && this.cacheable();
this.clearDependencies && this.clearDependencies();
var rawJs = loaderUtils.getRemainingRequest(this);
return "require(" + JSON.stringify(path.join(__dirname, "addScript" + (this.web ? ".web" : "") + ".js")) + ")"+
return "require(" + JSON.stringify("!" + path.join(__dirname, "addScript.js")) + ")"+
"(require(" +
JSON.stringify("raw" + rawJs) + ")" +
JSON.stringify("!raw!" + remainingRequest) + ")" +
(this.debug ?

@@ -19,7 +17,6 @@ "+" +

"\n\n// SCRIPT-LOADER FOOTER\n//@ sourceURL=script:///" +
encodeURI(rawJs.replace(/^!/, "")).replace(/%5C|%2F/g, "/").replace(/\?/, "%3F").replace(/^\//, "")
encodeURI(remainingRequest.replace(/^!/, "")).replace(/%5C|%2F/g, "/").replace(/\?/, "%3F").replace(/^\//, "")
) :
"") +
")";
}
module.exports.seperable = true;
};
{
"name": "script-loader",
"version": "0.3.1",
"version": "0.5.0",
"author": "Tobias Koppers @sokra",
"description": "script loader module for webpack",
"dependencies": {
"raw-loader": "0.1.x",
"loader-utils": "0.1.x"
"raw-loader": "0.5.x"
},

@@ -15,4 +14,3 @@ "licenses": [

}
],
"license": "MIT"
]
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc