fix(excalidraw): fusion imports ESM en un seul module + CSP worker-src/blob:
CI / lint (push) Failing after 13s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 29s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled

This commit is contained in:
2026-07-29 11:17:06 -04:00
parent 1b5319fde1
commit dfd8d5929c
4 changed files with 67 additions and 9 deletions
+3 -6
View File
@@ -89,18 +89,15 @@
<button id="btn-export-svg" title="Export SVG">📐 SVG</button>
</div>
<!-- Import React + ReactDOM (Excalidraw peer dependencies) -->
<!-- Import React, ReactDOM, and Excalidraw in a single module (order matters!) -->
<script type="module">
import React from "https://esm.sh/react@18";
import ReactDOM from "https://esm.sh/react-dom@18";
import * as ExcalidrawLib from "https://esm.sh/@excalidraw/[email protected]";
window.React = React;
window.ReactDOM = ReactDOM;
</script>
<!-- Configure Excalidraw asset path BEFORE import -->
<script type="module">
window.EXCALIDRAW_ASSET_PATH = "https://esm.sh/@excalidraw/[email protected]/dist/prod/";
import * as ExcalidrawLib from "https://esm.sh/@excalidraw/[email protected]";
window.ExcalidrawLib = ExcalidrawLib;
const { Excalidraw, exportToBlob, exportToSvg } = ExcalidrawLib;