You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting with a setup that has sveltekit apps and libs in the same monorepo, in subdirectories. To cater to this, I have a single svelte.config.js that accepts a subdir as argument and adds it to files, vite.cachedir and vite.server.fs.allow.
I noticed that when trying to publish a lib, the svelte-kit package command fails with:
> ENOENT: no such file or directory, scandir '<repo_root>/package'
Searching for the missing package folder, I find it nested under libs/ui, which is surprising, because I haven't set package.dir in svelte.config.js yet.
If I set package.dir to libs/ui/package, then the ERROR now shows the correct path, but the package dir is now doubly nested under libs/ui/libs/ui/package.
Fiddling around, it seems that package.dir emits relative to tsconfig.json, because if I move it around, the relative package dir also moves.
martaver
changed the title
'svelte-kit package' outputs package dir relative to tsconfig, but command looks relate to svelte.config.js
'svelte-kit package' outputs package dir relative to tsconfig, but post-build code searches relative to svelte.config.js
Dec 8, 2021
Describe the bug
I'm experimenting with a setup that has sveltekit apps and libs in the same monorepo, in subdirectories. To cater to this, I have a single
svelte.config.js
that accepts a subdir as argument and adds it tofiles
,vite.cachedir
andvite.server.fs.allow
.I noticed that when trying to publish a lib, the
svelte-kit package
command fails with:Searching for the missing
package
folder, I find it nested underlibs/ui
, which is surprising, because I haven't setpackage.dir
insvelte.config.js
yet.If I set
package.dir
tolibs/ui/package
, then the ERROR now shows the correct path, but the package dir is now doubly nested underlibs/ui/libs/ui/package
.Fiddling around, it seems that
package.dir
emits relative to tsconfig.json, because if I move it around, the relative package dir also moves.Reproduction
https://github.com/cleric-sh/repro/tree/sveltekit-package-nested-dir
just clone and
yarn && yarn svelte-kit package
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: