Closed KiraPC closed 3 months ago
Can you share minimal REPL and take a screenshot for showing error message?
I quickly try to use svelte-preprocess-delegate-events
with latest SvelteKit and Svelte 4, but it works properly, so I think specific condition is needed.
So could you please share me the REPL and error message?
@baseballyama Prepare a REPL is not possible now for me, I know that I'm asking a question but unfortunately I can't now, but maybe, this is a thing related to the fact that I'm using "on:*" on a svelte:component tag? Should it work also on this scenario?
@baseballyama I guess not. I've just modified your REPL here https://stackblitz.com/edit/sveltejs-kit-template-default-zkzqgi?file=src%2Flib%2Fui%2FComponentWrapper.svelte and a simil error appears.
@KiraPC Nice! Thank you for your REPL. I will fix it and make a new release! Please give me a few hours or a few days.π
@baseballyama No problem, thank for your work :)
@KiraPC
I checked it again but REPL uses svelte-preprocess-delegate-events
0.4.1.
This is not latest version.
After I upgrade to 0.4.3, it works well.
Can you check it?
(I noticed that when I wrote the test to submit a PR for thisπ
)
@baseballyama Ok found the issue. It is related to an if else statement.
So basically, when there is more then one "svelte:component" tag inside the same component
@KiraPC 0.4.4 is released. Could you please confirm that this has been fixed?
@baseballyama Yeh now it seems working and events are correctly dispatched, but it seems is not generating the types from +[page|layout].server.ts files
@KiraPC
Yeh now it seems working and events are correctly dispatched
Nice!
it seems is not generating the types from +[page|layout].server.ts files
What do you mean? svelte-preprocess-delegate-events
is preprocessor for .svelte
files.
Why +[page|layout].server.ts
is relevant for this?
@baseballyama Ok, sorry, it was related to the added of
"include": ["./svelte-jsx.d.ts"]
to the tsconfig.json file
I'm trying to use this library with svelte4 and vitePreprocess but configuring the svelte.config.js as follow:
I'm receiving a transform error:
What am I wrong?