sveltejs / sveltejs/kit

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

Open
#4,052 18 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p2-nice-to-have
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the SVELTE_KIT constant in constants.js and how svelte.config.js handles kit.vite.build.outDir. Check the existing error about the ignored Vite option and identify the configuration path that controls the generated output directory. Done means monorepo builds can use a configured directory without the current fixed-path behavior or error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.