We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b4c4c1 commit 18f8755Copy full SHA for 18f8755
src/commands/bootstrap.ts
@@ -54,7 +54,7 @@ export const presetFields = Object.freeze({
54
function transformModuleImports(fileContents: string) {
55
return fileContents.replace(
56
/* this regex should hopefully catch all kind of import/export expressions that are relative. */
57
- /((?:import|export)\s+.*\s+from\s+["'])((?:\.\/|\.\.\/)(?:(?!\.js).)+)(["'])/g,
+ /((?:import|export)\s+[\s\w,{}*]*\s+from\s+["'])((?:\.\/|\.\.\/)(?:(?!\.js).)+)(["'])/g,
58
(_, importFromPart, modulePath, hyphenEndPart) =>
59
`${importFromPart}${modulePath}.js${hyphenEndPart}`
60
);
0 commit comments