svelte-jsoneditor
svelte-jsoneditor copied to clipboard
Svelte 5 support
I'm working on a project that uses svelte-jsoneditor. All is well when using the 4.x version of Svelte, but I tried using Svelte 5 today and there seems to be a problem with the svelte preprocessor:
✘ [ERROR] node_modules/svelte-jsoneditor/components/modals/TransformWizard.svelte:94:2 <tr> is invalid inside <table> [plugin vite-plugin-svelte:optimize-svelte]
node_modules/svelte-jsoneditor/components/modals/TransformWizard.svelte:94:0:
94 │
╵ ^
The plugin "vite-plugin-svelte:optimize-svelte" was triggered by this import
node_modules/svelte-jsoneditor/components/modals/TransformModal.svelte:21:28:
21 │ import TransformWizard from './TransformWizard.svelte';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm not sure why the problem which seems to be triggered by the pre-processor only shows up with 5.
I created a simple project that shows the issue here: https://github.com/chillenious/svelte-jsoneditor-issue. Note that simply by changing the svelte to a 4.x dependency, the project will work again.