-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Upgrade Vite to latest #2424
Upgrade Vite to latest #2424
Conversation
🦋 Changeset detectedLatest commit: 7d1479b The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
✔️ Deploy Preview for astro-docs-2 ready! 🔨 Explore the source changes: 56f75c1 🔍 Inspect the deploy log: https://app.netlify.com/sites/astro-docs-2/deploys/61f8553d3a613b000876b20a 😎 Browse the preview: https://deploy-preview-2424--astro-docs-2.netlify.app |
Blocked by vitejs/vite#6576 |
This is blocked by another Vite bug that I'm submitting a PR for shortly. |
Blocked by vitejs/vite#6589 |
f5f268c
to
22c44e1
Compare
Looks like the final issues caused by Svelte are now passing! Just two issues left. |
228f74a
to
56f75c1
Compare
1d1870f
to
ab3ee62
Compare
This is super close, one last absolute path issue on Windows. |
611c81a
to
a950a47
Compare
@@ -3,7 +3,6 @@ | |||
import AdminsReact from '../components/AdminsReact.jsx'; | |||
import AdminsSvelte from '../components/AdminsSvelte.svelte'; | |||
import AdminsVue from '../components/AdminsVue.vue'; | |||
import AdminsPreact from '../components/AdminsPreact.jsx'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a change worth calling out... Had to drop the @nanostores/preact
usage from this example to get everything passing. I think there's some issue with deduping going on, but I'm hoping it's just in our monorepo. Will be sure to check this once we cut a release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the callout. If you're worried about not being able to resolve this before end of week, I'd suggest creating an issue to track adding @nanostores/preact
back.
@@ -106,7 +105,7 @@ | |||
"strip-ansi": "^7.0.1", | |||
"supports-esm": "^1.0.0", | |||
"tsconfig-resolver": "^3.0.1", | |||
"vite": "~2.6.10", | |||
"vite": "^2.8.0-beta.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more vendored vite
! It's a real dependency.
const ALWAYS_NOEXTERNAL = new Set([ | ||
'astro', // This is only because Vite's native ESM doesn't resolve "exports" correctly. | ||
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is no longer true, so astro
can now be optimized by Vite.
import { valueToEstree } from 'estree-util-value-to-estree'; | ||
import * as astring from 'astring'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These packages we needlessly complex and weren't being handled well by Vite.
} | ||
}, | ||
}; | ||
import serializeJavaScript from 'serialize-javascript'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was replaced by serializeJavaScript
which handles everything for us.
if (filename.startsWith('/@fs')) { | ||
filename = filename.slice('/@fs'.length); | ||
} else if (filename.startsWith('/') && !ancestor(filename, config.projectRoot.pathname)) { | ||
filename = new URL('.' + filename, config.projectRoot).pathname; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewp any idea if this was old code that snuck back in via a rebase?
0ea516a
to
7d1479b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! What a huge effort @natemoo-re !
Just a callout that this will be released as npm install astro@next
before it goes out to everyone, so there will be time to test with real-user data post-merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what this change is, it was surprising clear. Well done, @natemoo-re!
* chore: unvendor vite * chore: upgrade vue and svelte * feat(renderer-solid): upgrade for [email protected] * chore: update yarn.lock * fix(solid): upgrade solid renderer for [email protected] * test: improve css test * chore: upgrade to [email protected] * fix: replace hacky serialization with 'serialize-javascript' * fix: externalize serialize-javascript * fix: explicitly add [email protected] to devDependencies * test(css): skip css?url test * chore: update vite-plugin-svelte * fix: ssr option * chore: update changeset * chore: remove changeset * chore: add changeset * chore: add back missing changeset * chore: update vite * chore: update to latest vite * test: update proload? * chore: update dependencies * fix: remove preact from nanostores example * fix: update static-build-pkg to use `.mjs` extension * fix: exclude './server.js' from custom-elements test * chore: remove unused file
Changes
[email protected]
#1866 (that branch had gotten unwieldy.)[email protected]
as there are some fixes there that haven't landed in[email protected]
Testing
Tracking tests in CI
Docs
N/A