Socket
Socket
Sign inDemoInstall

script-loader

Package Overview
Dependencies
2
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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": [

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