Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5 support #452

Closed
chillenious opened this issue Jun 14, 2024 · 4 comments
Closed

Svelte 5 support #452

chillenious opened this issue Jun 14, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@chillenious
Copy link

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.

@josdejong
Copy link
Owner

josdejong commented Jun 19, 2024

The editor isn't yet ready for Svelte 5.

I did a short test recently trying to upgrade to Svelte 5. That gives some styling issues, the modals do not work (with a clear error), and a list of compiler warnings. It doesn't look that complicated to fix, but it will take time and requires extensive testing. Also, some of the dependencies, like svelte-awesome, is not yet supporting Svelte 5.

On a side note: Svelte 5 is not yet production ready, so it is good to prepare for it but we still need some patience :)

@josdejong josdejong changed the title problem with TransformModal and svelte 5 (and svelte preprocessor) Svelte 5 support Jun 19, 2024
@josdejong josdejong added the enhancement New feature or request label Jul 4, 2024
@josdejong
Copy link
Owner

See #476

There are quite some issues that need to get resolved. Any help would be welcome.

@KoalaBear84
Copy link
Contributor

Just FYI: I guess this now is implemented?

https://github.com/josdejong/svelte-jsoneditor/releases/tag/v2.0.0

@josdejong
Copy link
Owner

Ah, yes, I didn't realize there was a separate issue about Svelte 5 support, this can be closed now.

Implemented via #490.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants