Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-module-rewrite

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-module-rewrite - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

7

lib/index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc