babel-plugin-transform-leancloud-require
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -18,3 +18,6 @@ const path = require('path'); | ||
var relativePath = path.posix.relative(path.dirname(fromPath), targetPath); | ||
console.log({fromPath, targetPath, relativePath}); | ||
if (relativePath.indexOf('.') !== 0) { | ||
relativePath = './' + relativePath; | ||
} | ||
console.log(JSON.stringify({fromPath, targetPath, relativePath})); | ||
modulePath.value = relativePath; | ||
@@ -21,0 +24,0 @@ } |
{ | ||
"name": "babel-plugin-transform-leancloud-require", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Transform LeanCloud's require('cloud/') to Node.js's require('./')", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3085
22