mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-04-25 03:00:24 +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 require = __cjs_mod__.createRequire(import.meta.url);
|
||||||
`
|
`
|
||||||
|
|
||||||
const ESMStaticImportRe =
|
const ESMStaticImportRe = /import\s+.+?\s+from\s+['"].+?['"];(?![\s\S]*import\s+.+?\s+from\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