Skip to content

Commit

Permalink
fix: do not rewrite dynamic import if format is not native es
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 6, 2021
1 parent a59ffef commit eb35bd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/dynamicImportPolyfill.ts
Expand Up @@ -26,8 +26,8 @@ export function dynamicImportPolyfillPlugin(config: ResolvedConfig): Plugin {
)
}
},
renderDynamicImport() {
if (skip) {
renderDynamicImport({ format }) {
if (skip || format !== 'es') {
return null
}
if (!polyfillLoaded) {
Expand Down

0 comments on commit eb35bd5

Please sign in to comment.