Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] return config from server start methods #5043

Merged
merged 2 commits into from
May 24, 2022
Merged

Conversation

benmccann
Copy link
Member

We shouldn't read the Kit config in the CLI, but rather in the Vite plugin so that it will work with the vite CLI as well. This doesn't move the config reading all the way to the plugin yet, but does remove it from the CLI which is a step in that direction

@changeset-bot
Copy link

changeset-bot bot commented May 23, 2022

🦋 Changeset detected

Latest commit: acebe26

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benmccann benmccann marked this pull request as ready for review May 23, 2022 23:49
@benmccann benmccann changed the title [chore] get base from Vite server for welcome message [chore] return config from server start methods May 24, 2022
@bluwy
Copy link
Member

bluwy commented May 24, 2022

We shouldn't read the Kit config in the CLI, but rather in the Vite plugin so that it will work with the vite CLI as well

If it's moved into a Vite plugin, then we would have to undo #4760 since we can't pass the config between Vite plugins, unless using Rollup's api convention (which isn't the most ergonomic API). We'd be loading the config twice, but it isn't too bad.

Another point from vite-plugin-svelte experience though, is that loading the Svelte config in the Vite plugin is a PITA. Due to it's async nature, it's hard to split up into smaller segmentized Vite plugins if needed in the future.


The PR now is still great though.

@Rich-Harris Rich-Harris merged commit 4653921 into master May 24, 2022
@Rich-Harris Rich-Harris deleted the base-welcome branch May 24, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants