create-capacitor-plugin icon indicating copy to clipboard operation
create-capacitor-plugin copied to clipboard

Due to TS v4, having a capacitor plugin in a monorepo with a SvelteKit project kills page data types

Open jacob-8 opened this issue 2 months ago • 0 comments

Update this line: https://github.com/ionic-team/create-capacitor-plugin/blob/97504d75c68a589b31cf375d9b68271907a4beea/assets/plugin-template/package.json.mustache#L64C5-L64C27

I highly recommend updating the plugin's Typescript package to version 5, otherwise SvelteKit users will randomly find themselves with issues whereby their page data types no longer work. The Svelte and TS LSPs see Typescript 4 in the node modules and this break the types that rely on Typescript 5. It doesn't matter if you even use the plugin in your SvelteKit app, just having Typescript 4 in your node_modules is enough to break things.

jacob-8 avatar Nov 28 '25 13:11 jacob-8