-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Describe the bug
Looking at https://github.com/sveltejs/kit/blob/master/packages/kit/src/cli.js#L167-L187 you can see from inspection that these two config entries will always be overwritten because the options are defaulted. svelte-kit dev doesn't share this problem because these options are not defaulted.
Reproduction
- Create a new sveltekit project via
npm create svelte foobar - Edit
svelte.config.jsand setconfig.kit.vite.preview.portto3001 - Run e.g.
npm run preview
Logs
Output:
SvelteKit v1.0.0-next.357
local: http://localhost:3000
network: not exposed
Use --host to expose server to other devices on this networkSystem Info
System:
OS: Linux 5.17 Pop!_OS 22.04 LTS
CPU: (16) x64 AMD Ryzen 7 PRO 5850U with Radeon Graphics
Memory: 1.02 GB / 15.02 GB
Container: Yes
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.asdf/installs/nodejs/16.13.1/bin/node
Yarn: 3.2.1 - ~/.asdf/shims/yarn
npm: 8.1.2 - ~/.asdf/plugins/nodejs/shims/npm
Watchman: 4.9.0 - /usr/bin/watchman
Browsers:
Chrome: 103.0.5060.53
Firefox: 101.0.1
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.53
@sveltejs/adapter-static: ^1.0.0-next.34 => 1.0.0-next.34
@sveltejs/kit: next => 1.0.0-next.357
svelte: ^3.44.0 => 3.48.0 Severity
annoyance
Additional Information
This is a mild annoyance but a trivial fix. The only reason this isn't a PR is because I don't see any obvious way to put tests around this. If you don't care, or can point me in the right direction, I'll send a PR.
I also saw the suggestion to stop using svelte-kit preview in favor of vite preview which looks like it would make this issue moot.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels