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 Compatability #44

Open
evaneliasyoung opened this issue Jul 21, 2024 · 4 comments
Open

Svelte 5 Compatability #44

evaneliasyoung opened this issue Jul 21, 2024 · 4 comments
Assignees
Labels
Type: Feature A new feature or functionality

Comments

@evaneliasyoung
Copy link

evaneliasyoung commented Jul 21, 2024

When attempting to use the use:tooltip action or <Tooltip content={{component: ...}}>...</Tooltip> in the Svelte 5 Release Candidate ([email protected]) I encounter this error.
I understand that Svelte 5 has not officially released, however support for the next generation would be a nice addition.

errors.js:86  Uncaught Svelte error: component_api_invalid_new
Attempted to instantiate node_modules/@svelte-plugins/tooltips/dist/action-tooltip.svelte with `new Action_tooltip`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information
    at component_api_invalid_new (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:331:19)
    at check_target (http://localhost:5173/node_modules/.vite/deps/chunk-QAZS5SUY.js?v=9c134686:215:5)
    at new Action_tooltip (http://localhost:5173/node_modules/.vite/deps/@svelte-plugins_tooltips.js?v=9c134686:392:3)
    at http://localhost:5173/node_modules/.vite/deps/chunk-QAZS5SUY.js?v=9c134686:201:26
    at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:839:23)
    at update_effect (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:957:21)
    at create_effect (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:1480:7)
    at branch (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:1602:10)
    at http://localhost:5173/node_modules/.vite/deps/chunk-QAZS5SUY.js?v=9c134686:195:17
    at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:839:23)
component_api_invalid_new @ errors.js:86
check_target @ legacy.js:9
Action_tooltip @ tooltip.svelte:235
(anonymous) @ hmr.js:42
update_reaction @ runtime.js:286
update_effect @ runtime.js:458
create_effect @ effects.js:110
branch @ effects.js:318
(anonymous) @ hmr.js:33
update_reaction @ runtime.js:286
update_effect @ runtime.js:458
create_effect @ effects.js:110
block @ effects.js:310
(anonymous) @ hmr.js:24
onShow @ action.js:43
@evaneliasyoung evaneliasyoung changed the title Svelte 5 Compatability use:tooltip Svelte 5 Compatability Jul 21, 2024
@evaneliasyoung evaneliasyoung changed the title use:tooltip Svelte 5 Compatability Svelte 5 Compatability Jul 21, 2024
@dysfunc dysfunc self-assigned this Jul 31, 2024
@dysfunc dysfunc added the Type: Feature A new feature or functionality label Jul 31, 2024
@Donny-H
Copy link

Donny-H commented Oct 24, 2024

Now that 5 is out, this would be awesome

@stalkerg
Copy link

stalkerg commented Nov 2, 2024

seems like this

/// svelte.config.js
export default {
	compilerOptions: {
		compatibility: {
			componentApi: 4
		}
	}
};

should help, but it's not working for me.

@kamranasad7
Copy link

I would love a svelte 5 version too. Cant get compatibility.componentApi to work.

@inzanez
Copy link

inzanez commented Dec 2, 2024

Agree, moving to Svelte5 might be the better option. Question is, how straightforward is it? There seem to be some internal APIs in use,...so some redesign might be requried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature A new feature or functionality
Projects
None yet
Development

No branches or pull requests

6 participants