vite-plugin-fast-external
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -11,9 +11,7 @@ const resolve = require('vite-plugin-resolve'); | ||
Object.keys(externals).forEach(key => { | ||
const strOrFn = Object.values(externals[key])[0]; | ||
for (const [moduleId, strOrFn] of Object.entries(externals)) { | ||
if (typeof strOrFn === 'string') { | ||
const iifeName = strOrFn; | ||
externals[key] = `const ${iifeName} = window['${iifeName}']; export { ${iifeName} as default }`; | ||
externals[moduleId] = `const ${moduleId} = window['${/* iife name */strOrFn}']; export { ${moduleId} as default }`; | ||
} | ||
}); | ||
} | ||
@@ -20,0 +18,0 @@ const plugin = resolve(externals, options); |
{ | ||
"name": "vite-plugin-fast-external", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "Without lexical transform, support custom external code.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
7571
46