fix: use namespace import for vite to support upcoming vite 3.0 esm#5030
fix: use namespace import for vite to support upcoming vite 3.0 esm#5030Rich-Harris merged 3 commits intosveltejs:masterfrom
Conversation
🦋 Changeset detectedLatest commit: 3253b09 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 |
|
Nice, this is great news. Is there any reason to prefer named imports over a namespace import? I tend to think |
|
I feel it's a bit more explicit to use the named exports, but the readability is indeed reduced. 🤔 Indifferent about it if there are no other technical benefits in avoiding * imports |
|
Yeah, there's no technical benefits, it's really just a stylistic preference |
|
I was going to go with something more like |
vite 3.0 is going to be esm first 🎉 vitejs/vite#8178
No default export means we have to change a few
import vite from 'vite'to prevent errors like this one:https://github.com/vitejs/vite-ecosystem-ci/runs/6549407184?check_suite_focus=true#step:7:392
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. All changesets should bepatchuntil SvelteKit 1.0