Skip to content

Commit 4373746

Browse files
committed
Add missing global flag to regex statements
1 parent e3ebe61 commit 4373746

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const COMMENTED_PATTERN =
2323
/(\/\*(?:(?!\*\/).|[\n\r])*\*\/)|(\/\/[^\n\r]*(?:[\n\r]+|$))/
2424
const IMPORT_PATTERNS = [
2525
/from (["'])(.*?)\1/g,
26-
/import\((["'])(.*?)\1\)/,
27-
/require\((["'])(.*?)\1\)/,
28-
/import\s+(["'])(.*?)\1/,
26+
/import\((["'])(.*?)\1\)/g,
27+
/require\((["'])(.*?)\1\)/g,
28+
/import\s+(["'])(.*?)\1/g,
2929
]
3030

3131
function parseImports(file: ReadonlyArray<string>, dir: string): FileData[] {

0 commit comments

Comments
 (0)