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 Dec 11, 2019
1 parent 7b54a94 commit 4c70b65
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 @@ -152,11 +152,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 4c70b65

Please sign in to comment.