Configure output directory (currently fixed to ".svelte-kit")
See original GitHub issueDescribe the problem
In monorepos, builds are often centralized into a single top-level build directory.
Is there anything that prevents that change from being innocent and simple?
Describe the proposed solution
In order for svelte-kit to support that, the SVELTE_KIT constant in constants.js should be replaced by a configuration option.
setting the kit.vite.build.outDir options prints an error:
build_server: The value for kit.vite.build.outDir specified in svelte.config.js has been ignored. This option is controlled by SvelteKit.
should the vite option be used, or should there be svelte-kit specific option?
Importance
nice to have
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Configuration • Docs • SvelteKit
Your project's configuration lives in a svelte.config.js file at the root of your project. As well as SvelteKit, this config object is used...
Read more >Is there an equivalent to Vite's build.outDir in SvelteKit, and ...
With SvelteKit, the output is usually based around the adapter. For example, the adapter-static allows to change where the output is placed.
Read more >[Tutorial] Build a website with SvelteKit - Prismic
Create a layout. In your project, the file src/routes/[...path]/+page.svelte is the main page component of your app ...
Read more >Major Svelte Kit API Change - Fixing `load`, and tightening up ...
https://github.com/sveltejs/kit/discussions/5748Simple Made Easy: https://www.youtube.com/watch?v=SxdOUGdseq4Become a Level Up Pro and take ...
Read more >Getting Started Building a Svelte App with SvelteKit
Simply run the following command, which will create a new folder called .svelte-kit with all your production ready files in. npm run build....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The directory is used for more than Vite builds, so we can’t use
vite.build.outDir— Kit needs to control it. Having it be configurable seems reasonable, we would just need to bikeshed a name.buildDir?outDir?tmpDir? something else?I did, yeah — closed by accident. An
outDiroutside the project directory should work as long as you don’t specifypathsconfig, but we need to address that case before we can consider this fully closed