mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-04-06 04:05:44 +08:00
fix: last static import for esm shim
This commit is contained in:
parent
52fce25787
commit
aaaa545043
@ -20,8 +20,7 @@ const __dirname = __cjs_path__.dirname(__filename);
|
||||
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
|
||||
const ESMStaticImportRe = /import\s+.+?\s+from\s+['"].+?['"];(?![\s\S]*import\s+.+?\s+from\s+['"].+?['"];)/gmu
|
||||
|
||||
interface StaticImport {
|
||||
end: number
|
||||
|
Loading…
x
Reference in New Issue
Block a user