mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-10-12 17:12:12 +08:00
Update regex
This commit is contained in:
parent
d5a103f980
commit
187007b230
@ -31,7 +31,7 @@ const require = __cjs_mod__.createRequire(import.meta.url);
|
||||
`
|
||||
|
||||
const ESMStaticImportRe =
|
||||
/(?<!\/\/.*?)(?<=\s|^|;)import\s*([\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu
|
||||
/(?<=^(|\s|;))import\s*([\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu
|
||||
|
||||
interface StaticImport {
|
||||
end: number
|
||||
|
Loading…
x
Reference in New Issue
Block a user