Skip to content

Commit 18f8755

Browse files
committed
fix: regex
1 parent 7b4c4c1 commit 18f8755

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const presetFields = Object.freeze({
5454
function transformModuleImports(fileContents: string) {
5555
return fileContents.replace(
5656
/* this regex should hopefully catch all kind of import/export expressions that are relative. */
57-
/((?:import|export)\s+.*\s+from\s+["'])((?:\.\/|\.\.\/)(?:(?!\.js).)+)(["'])/g,
57+
/((?:import|export)\s+[\s\w,{}*]*\s+from\s+["'])((?:\.\/|\.\.\/)(?:(?!\.js).)+)(["'])/g,
5858
(_, importFromPart, modulePath, hyphenEndPart) =>
5959
`${importFromPart}${modulePath}.js${hyphenEndPart}`
6060
);

0 commit comments

Comments
 (0)