|
| 1 | +diff --git a/dist/index.cjs b/dist/index.cjs |
| 2 | +index 887890308b948028ddde32ae180f3d0ca4519f39..7fc5b3459971de6cf6ada18934f676717badcf24 100644 |
| 3 | +--- a/dist/index.cjs |
| 4 | ++++ b/dist/index.cjs |
| 5 | +@@ -1096,8 +1096,8 @@ function createResolve(defaults) { |
| 6 | + |
| 7 | + const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm; |
| 8 | + const DYNAMIC_IMPORT_RE = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm; |
| 9 | +-const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function|function|let|const enum|const|enum|var|class))\s+(?<name>[\w$_]+)/g; |
| 10 | +-const EXPORT_NAMED_RE = /\bexport\s+{(?<exports>[^}]+?)(?:[,\s]*)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; |
| 11 | ++const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function|function|let|const enum|const|enum|var|class|type))\s+(?<name>[\w$_]+)/g; |
| 12 | ++const EXPORT_NAMED_RE = /\bexport( type)?\s+{(?<exports>[^}]+?)(?:[,\s]*)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; |
| 13 | + const EXPORT_STAR_RE = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; |
| 14 | + const EXPORT_DEFAULT_RE = /\bexport\s+default\s+/g; |
| 15 | + function findStaticImports(code) { |
| 16 | +diff --git a/dist/index.mjs b/dist/index.mjs |
| 17 | +index 2114bf00092fc74642243b3ded5a718183a01039..e9409fc1187a9579eeb5129113f226625798b95c 100644 |
| 18 | +--- a/dist/index.mjs |
| 19 | ++++ b/dist/index.mjs |
| 20 | +@@ -1086,8 +1086,8 @@ function createResolve(defaults) { |
| 21 | + |
| 22 | + const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm; |
| 23 | + const DYNAMIC_IMPORT_RE = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm; |
| 24 | +-const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function|function|let|const enum|const|enum|var|class))\s+(?<name>[\w$_]+)/g; |
| 25 | +-const EXPORT_NAMED_RE = /\bexport\s+{(?<exports>[^}]+?)(?:[,\s]*)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; |
| 26 | ++const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function|function|let|const enum|const|enum|var|class|type))\s+(?<name>[\w$_]+)/g; |
| 27 | ++const EXPORT_NAMED_RE = /\bexport( type)?\s+{(?<exports>[^}]+?)(?:[,\s]*)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; |
| 28 | + const EXPORT_STAR_RE = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n;]*)?/g; |
| 29 | + const EXPORT_DEFAULT_RE = /\bexport\s+default\s+/g; |
| 30 | + function findStaticImports(code) { |
0 commit comments