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
When building, npm run build, with the node adapter I noticed old files are still in the adapter's output directory. In the attached image you can see multiple versions of each __layout, index and error files in the ll-app/build folder's subdirectories. In addition, an old favicon_old.svg is in there.
Not sure if this is specific to just node or all the adapters.
Describe the proposed solution
It would be nice if the adapter had an option to always clean the output directory. It would be even better if the default behavior was to clean on every run. This step is likely going to be part of any production build/pipeline so being 100% that all steps along the way are clean would be great!
I know this is a really simple thing for anyone to script up on their own, but intuitively (and lazily!) I've come to expect build and export directories to be the cleanest version of themselves automatically. If this project wasn't in such I simple state right now I'm not sure when I would have noticed old assets being in there. If you decided against adding this feature, I ask that it at least gets mentioned in the documentation of the svelte-kit build command line option!
Alternatives considered
The alternative is just to clear/delete the adapter's output directory prior to ever running npm run build.
Importance
would make my life easier
Additional Information
My svelte.config.js files looks like this
importpreprocessfrom'svelte-preprocess';importnodefrom'@sveltejs/adapter-node';/** @type {import('@sveltejs/kit').Config} */constconfig={// Consult https://github.com/sveltejs/svelte-preprocess// for more information about preprocessorspreprocess: preprocess(),kit: {// hydrate the <div id="svelte"> element in src/app.htmladapter: node(),target: '#svelte'}};exportdefaultconfig;
The text was updated successfully, but these errors were encountered:
Thanks for opening an issue. Yes, this is specific to adapter-node as it is the only adapter left that hasn't clear out the build output prior to adapting, might just be an oversight.
Describe the problem
When building,
npm run build
, with the node adapter I noticed old files are still in the adapter's output directory. In the attached image you can see multiple versions of each __layout, index and error files in thell-app/build
folder's subdirectories. In addition, an old favicon_old.svg is in there.Not sure if this is specific to just node or all the adapters.
Describe the proposed solution
It would be nice if the adapter had an option to always clean the output directory. It would be even better if the default behavior was to clean on every run. This step is likely going to be part of any production build/pipeline so being 100% that all steps along the way are clean would be great!
I know this is a really simple thing for anyone to script up on their own, but intuitively (and lazily!) I've come to expect build and export directories to be the cleanest version of themselves automatically. If this project wasn't in such I simple state right now I'm not sure when I would have noticed old assets being in there. If you decided against adding this feature, I ask that it at least gets mentioned in the documentation of the
svelte-kit build
command line option!Alternatives considered
The alternative is just to clear/delete the adapter's output directory prior to ever running
npm run build
.Importance
would make my life easier
Additional Information
My svelte.config.js files looks like this
The text was updated successfully, but these errors were encountered: