Closed vincenzoml closed 1 week ago
Hi,
Thank you for your issue.
Did you install the package : npm install @codemirror/lang-javascript
?
Yes I did! It ought to be better to mention this in the same README where the example is presented, it is confusing for those who have not used codemirror before.
------ Messaggio originale ------ Da "Maxime LUCE" @.> A "touchifyapp/svelte-codemirror-editor" @.> Cc "Vincenzo Ciancia" @.>; "Author" @.> Data 21/09/2023 12:18:19 Oggetto Re: [touchifyapp/svelte-codemirror-editor] The example in README.md cannot compile because @.***/lang-javascript` is missing (Issue #22)
Hi, Thank you for your issue. Did you install the package : npm install @codemirror/lang-javascript?
— Reply to this email directly, view it on GitHub https://github.com/touchifyapp/svelte-codemirror-editor/issues/22#issuecomment-1729280040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARNM5J3FOFRHJLA7TQQNB3X3QH6XANCNFSM6AAAAAA47OMERQ. You are receiving this because you authored the thread.Message ID: @.***>
@vincenzoml just follow the documentation and add followign to vite.config.ts
https://github.com/touchifyapp/svelte-codemirror-editor?tab=readme-ov-file#usage-with-vite--svelte-kit
// vite.config.js
const config = {
//...
optimizeDeps: {
exclude: ["codemirror", "@codemirror/language-javascript" /* ... */],
},
//...
}
Thanks @firehudson
Trying to run the example provided in README.md I get: