diff --git a/patches/@vitejs+plugin-legacy+1.8.2.patch b/patches/@vitejs+plugin-legacy+1.8.2.patch new file mode 100644 index 000000000..231d5b148 --- /dev/null +++ b/patches/@vitejs+plugin-legacy+1.8.2.patch @@ -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__` +