babel-plugin-add-module-require
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -7,3 +7,3 @@ module.exports = function (babel) { | ||
CallExpression(path) { | ||
if (path.BABEL_PLUGIN_ADD_MODULE_REQUIRE || path.node.BABEL_PLUGIN_ADD_MODULE_REQUIRE || path.node.callee.name !== 'require' || /^\w/.test(path.node.arguments[0].value)) { | ||
if (path.BABEL_PLUGIN_ADD_MODULE_REQUIRE || path.node.BABEL_PLUGIN_ADD_MODULE_REQUIRE || path.node.callee.name !== 'require' || /^[\w@]/.test(path.node.arguments[0].value)) { | ||
return; | ||
@@ -65,3 +65,3 @@ } | ||
ImportDeclaration(path) { | ||
if (path.BABEL_PLUGIN_ADD_MODULE_REQUIRE || /^\w/.test(path.node.source.value)) { | ||
if (path.BABEL_PLUGIN_ADD_MODULE_REQUIRE || /^[\w@]/.test(path.node.source.value)) { | ||
return; | ||
@@ -68,0 +68,0 @@ } |
{ | ||
"name": "babel-plugin-add-module-require", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A plugin like babel-plugin-add-module-exports and supports babel@7.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
4790