Skip to content

Commit

Permalink
fix: add .js extension to injected polyfill imports
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Nov 20, 2020
1 parent ab5a90c commit 46efa1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/babel-preset-env/src/utils.js
Expand Up @@ -57,11 +57,11 @@ export function isPolyfillSource(source: ?string): boolean {
}

const modulePathMap = {
"regenerator-runtime": "regenerator-runtime/runtime",
"regenerator-runtime": "regenerator-runtime/runtime.js",
};

export function getModulePath(mod: string): string {
return modulePathMap[mod] || `core-js/modules/${mod}`;
return modulePathMap[mod] || `core-js/modules/${mod}.js`;
}

export function createImport(path: NodePath, mod: string) {
Expand Down

0 comments on commit 46efa1d

Please sign in to comment.