We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d355568 commit 6ced135Copy full SHA for 6ced135
packages/vite/src/node/plugins/importAnalysisBuild.ts
@@ -42,7 +42,7 @@ const preloadMarkerRE = new RegExp(preloadMarker, 'g')
42
const dynamicImportPrefixRE = /import\s*\(/
43
44
const dynamicImportTreeshakenRE =
45
- /((?:\bconst\s+|\blet\s+|\bvar\s+|,\s*)(\{[^}.]+\})\s*=\s*await\s+import\([^)]+\))|(\(\s*await\s+import\([^)]+\)\s*\)(\??\.[\w$]+))|\bimport\([^)]+\)(\s*\.then\(\s*(?:function\s*)?\(\s*\{([^}.]+)\}\))/g
+ /((?:\bconst\s+|\blet\s+|\bvar\s+|,\s*)(\{[^}.=]+\})\s*=\s*await\s+import\([^)]+\))|(\(\s*await\s+import\([^)]+\)\s*\)(\??\.[\w$]+))|\bimport\([^)]+\)(\s*\.then\(\s*(?:function\s*)?\(\s*\{([^}.=]+)\}\))/g
46
47
function toRelativePath(filename: string, importer: string) {
48
const relPath = path.posix.relative(path.posix.dirname(importer), filename)
0 commit comments