-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[fix] support using arrays for kit.vite.resolve.alias #2328
Conversation
🦋 Changeset detectedLatest commit: 33bccef The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
thanks for the fix! it does feel a bit weird to me to do config merging in two different ways with this PR as it is right now. I would lean towards saying we either make the existing SvelteKit config merging work with regexes or do it with a Vite plugin for the whole Vite config blob (not sure if it'd be the same plugin or not, but I was also planning on adding a Vite plugin in #2232 to provide the SvelteKit middleware to the Vite server after vitejs/vite#4640 is merged) |
i'm in favor of using vite plugins to provide additional config, note that you cannot add vite-plugin-svelte via a config hook though (plugins are final before the hooks are called). But everything else can be done via one or multiple |
hmm, I wonder if it just makes things more complicated. we'll still need the sveltekit config merging for non-vite stuff. I wonder if it wouldn't just be simpler to fix the sveltekit config merging to handle regexes instead. it already handles functions, so shouldn't be much different from that |
The problem isn't because of the regexes, is because the Here is how it should be: kit/packages/kit/src/core/dev/index.js Lines 121 to 136 in bf3efd1
But this is a lot more verbose. |
I think we should create a |
The options I see are:
|
ah, thanks for clarifying. it looks like it was handled correctly in I see that |
Looking back now, I think adjusting the Update: There's also the |
Updated to have |
awesome! this looks great! thanks so much 😄 |
Fixes #2319
Thanks to @JeanJPNM for pointing out the additional places to update.
Notes:
packages/kit/test/global.d.ts
intopackages/kit/test/ambient.d.ts
because the latter hasexport {}
in it, making it a TS module.Before submitting the PR, please make sure you do the following
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0