-
I'm trying to use monaco-editor like here: https://github.com/caap-store/db-reflector/blob/run-query/src/lib/editor/Monaco.svelte and it throws this error on first load. On refresh, it goes away. Also
EDIT: An isolated test is at https://github.com/manuganji/svelte-monaco-test/blob/main/src/lib/editor/Monaco.svelte |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
I'm following the steps here: https://github.com/microsoft/monaco-editor/blob/main/docs/integrate-esm.md#using-vite |
Beta Was this translation helpful? Give feedback.
-
It might help to make a reproducible example which does not rely on having a Postgres database running to make it easier for people to look at it and give suggestions |
Beta Was this translation helpful? Give feedback.
-
An isolated test is at https://github.com/manuganji/svelte-monaco-test/blob/main/src/lib/editor/Monaco.svelte |
Beta Was this translation helpful? Give feedback.
-
Sounds like a bundling error on monaco-editor's part as it's |
Beta Was this translation helpful? Give feedback.
Sounds like a bundling error on monaco-editor's part as it's
module
entrypoint is an ESM.js
file, but thepackage.json
isn'ttype: module
. But at the same time, monaco-editor is browser-only, and it should be used inonMount
, which would bypass the issue.