-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vite-legacy): vitejs/vite#4767 ; do not know why but get out of m…
…y sight
- Loading branch information
Martin
committed
Jun 30, 2022
1 parent
ad7bba9
commit 7e5f6b5
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/node_modules/@vitejs/plugin-legacy/index.js b/node_modules/@vitejs/plugin-legacy/index.js | ||
index 2f1b199..1901ef6 100644 | ||
--- a/node_modules/@vitejs/plugin-legacy/index.js | ||
+++ b/node_modules/@vitejs/plugin-legacy/index.js | ||
@@ -23,7 +23,7 @@ const detectDynamicImportVarName = '__vite_is_dynamic_import_support' | ||
const detectDynamicImportCode = `try{import("_").catch(()=>1);}catch(e){}window.${detectDynamicImportVarName}=true;` | ||
const dynamicFallbackInlineCode = `!function(){if(window.${detectDynamicImportVarName})return;console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("${legacyPolyfillId}"),n=document.createElement("script");n.src=e.src,n.onload=function(){${systemJSInlineCode}},document.body.appendChild(n)}();` | ||
|
||
-const forceDynamicImportUsage = `export function __vite_legacy_guard(){import('data:text/javascript,')};` | ||
+const forceDynamicImportUsage = `` | ||
|
||
const legacyEnvVarMarker = `__VITE_IS_LEGACY__` | ||
|