Skip to content

Commit

Permalink
fix(scan): support named exports in vue/svelte files
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverTsang committed Feb 21, 2022
1 parent 29021bb commit 84e7783
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vite/src/node/optimizer/scan.ts
Expand Up @@ -294,7 +294,11 @@ function esbuildScanPlugin(
}
}

js += `import ${JSON.stringify(virtualModulePrefix + key)}\n`
const virtualModulePath = JSON.stringify(
virtualModulePrefix + key
)

js += `import ${virtualModulePath}\nexport * from ${virtualModulePath}\n`
}
}

Expand Down

0 comments on commit 84e7783

Please sign in to comment.