mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-10-13 02:12:13 +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 =
|
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 {
|
interface StaticImport {
|
||||||
end: number
|
end: number
|
||||||
|
Loading…
x
Reference in New Issue
Block a user