-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
CLI ignores Vite server config #2165
Copy link
Copy link
Closed
Labels
feature / enhancementNew feature or requestNew feature or requestp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.SvelteKit cannot be used by a small number of people, quality of life improvements, etc.
Description
Describe the bug
packages\kit\src\cli.js => async function get_Config() does not load the vite part of the config.
Therefore the params for server (like host, port, open, https,...) are ignored.
Solution:
- read vite config
- overwrite values in cli
Reproduction
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
kit: {
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
vite: {
server: {
port: 987,
}
}
}
};
export default config;
will not open server on port 987.
Logs
No response
System Info
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 4.02 GB / 15.88 GB
Binaries:
Node: 14.17.2 - ~\AppData\Local\Volta\tools\image\node\14.17.2\node.EXE
Yarn: 1.5.1 - C:\Program Files\Volta\yarn.EXE
npm: 6.14.13 - ~\AppData\Local\Volta\tools\image\node\14.17.2\npm.CMD
Browsers:
Chrome: 92.0.4515.131
Edge: Spartan (44.19041.906.0), Chromium (92.0.902.67)
Internet Explorer: 11.0.19041.1
npmPackages:
@sveltejs/kit: next => 1.0.0-next.146
svelte: ^3.34.0 => 3.42.1Severity
annoyance
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature / enhancementNew feature or requestNew feature or requestp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.SvelteKit cannot be used by a small number of people, quality of life improvements, etc.