Delay emptying of dist folder in package #10507
Labels
awaiting submitter
p3-edge-case
SvelteKit cannot be used in an uncommon way
pkg:svelte-package
Issues related to svelte-package
Describe the problem
svelte-package
currently works as follows 1) Emptydist/
2) generate Svelte types 3) Emit ts-types. Step 2) and 3) take LOOONG. So if asite-1
depends onpackage-1
, While step 2 and 3 are happening Vite HMR insite-1
sees that there are no files and crashes unrecoverably.Describe the proposed solution
Change the algorithm to the following:
./svelte-kit/__package__
:./.svelte-kit
folder./svelte-kit/__package__
todist/
https://github.com/sveltejs/kit/blob/master/packages/package/src/index.js#L31
It takes slightly longer because of the copying but it doesn't break apps that are depending
dist/
.Alternatives considered
The more nuclear option is to avoid
svelte-package
altogether and generate types usingsvelte2tsx
using a build script. In a monorepo setup you can get away with not pre-processing etc. and do it in the consuming application.Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: