babel-plugin-module-rewrite
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -18,5 +18,6 @@ 'use strict'; | ||
var replaceContainer = require((0, _path.resolve)(eval(resolveFrom), replaceFunc)); | ||
var absolutePath = (0, _path.resolve)(eval(resolveFrom), replaceFunc); | ||
var replaceContainer = require(absolutePath); | ||
if (!replaceContainer) { | ||
throw new Error('Cannot find replace function file: ' + replaceFunc); | ||
throw new Error('Cannot find replace function file: ' + absolutePath); | ||
} | ||
@@ -27,3 +28,3 @@ | ||
if (!replace || typeof replace !== 'function') { | ||
throw new Error('Cannot find replace handler in: ' + replaceFunc + " with name: " + replaceHandlerName); | ||
throw new Error('Cannot find replace handler in: ' + absolutePath + " with name: " + replaceHandlerName); | ||
} | ||
@@ -30,0 +31,0 @@ |
{ | ||
"name": "babel-plugin-module-rewrite", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Babel plugin to dynamically rewrite the path in require() and ES6 import", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7035
75