feat(create): provide svelte config in vite.config.js during create#1119
Conversation
…onfig-in-vite-config-during-create
🦋 Changeset detectedLatest commit: c5aa89e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Reads/edits config wherever it lives - a svelte.config.{js,ts} default export or the object passed to sveltekit() in vite.config.{js,ts}.
parseKitOptions now locates the config in either place and falls back to defaults instead of throwing. Deprecates file.svelteConfig in favour of the svelteConfig helper.
mdsvex, drizzle, sveltekit-adapter and eslint now edit the config wherever it lives; eslint only wires svelteConfig when a standalone svelte.config file exists.
…s/kit ^2.62.0 The inlined vite.config config needs kit >= 2.62.0; snapshots regenerated.
|
Ran some local tests, and everything is working perfectly fine, as soon as those (optional) comments are adressed, im fine by you merging this! Also lets keep it minor as you suggested. Can't approve since im the author |
|
Does The import is removed but the following issue is not closed yet:
Would love a clearer instruction for those who want to upgrade. e.g. the |
|
The import isn't gone - it's conditional.
Upgrading an existing project:
|
If I understood correctly:
|
Relates #1111
Discards: #1117
(let's try and create multiple small prs)
Description
I absolutely do not understand why we had so many
svelte.config.js's flying around, especially since they were all close to identical. Therefore removed most of them. Since everything in thevite.configis js based, there is no need to bother about.tsextensions during create.JYC update:
vite.config.tshas no typescript today, when I select ts, I expect to have it ints(and it's today's behavior). Let's keep it here.Todos:
@sveltejs/load-configSources:
Checklist