vite-plugin-resolve
Advanced tools
Comparing version 1.3.0 to 1.3.1
18
index.js
@@ -42,14 +42,12 @@ const fs = require('fs'); | ||
// generate external module file | ||
// generate custom-resolve module file | ||
for (const [module, strOrFn] of Object.entries(resolveDict)) { | ||
const moduleId = path.join(dir, module + '.js'); | ||
const moduleContent = typeof strOrFn === 'function' ? strOrFn() : strOrFn; | ||
if (!fs.existsSync(moduleId)) { | ||
// for '@scope/name' module | ||
ensureDir(path.parse(moduleId).dir); | ||
// for '@scope/name' module | ||
ensureDir(path.parse(moduleId).dir); | ||
const moduleContent = typeof strOrFn === 'function' ? strOrFn() : strOrFn; | ||
fs.writeFileSync(moduleId, moduleContent); | ||
} | ||
// write custom-resolve | ||
fs.writeFileSync(moduleId, moduleContent); | ||
} | ||
@@ -97,5 +95,5 @@ } | ||
if (!(fs.existsSync(dir) && fs.statSync(dir).isDirectory())) { | ||
fs.mkdirSync(dir, { recursive: true }) | ||
fs.mkdirSync(dir, { recursive: true }); | ||
} | ||
return dir | ||
return dir; | ||
} |
{ | ||
"name": "vite-plugin-resolve", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Custom resolve code for vite", | ||
@@ -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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
4821
104