question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configure output directory (currently fixed to ".svelte-kit")

See original GitHub issue

Describe 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:open
  • Created 2 years ago
  • Reactions:7
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
Rich-Harriscommented, Feb 22, 2022

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?

1reaction
Rich-Harriscommented, Mar 2, 2022

I did, yeah — closed by accident. An outDir outside the project directory should work as long as you don’t specify paths config, but we need to address that case before we can consider this fully closed

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found