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
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user