-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Migrate to Vite 3 ⚡️ #3570
Merged
Merged
Migrate to Vite 3 ⚡️ #3570
Changes from 43 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
17c9111
Vite 3 test
matthewp f803d80
deps: bump to Vite beta.1
bholmesdev aab15e5
refactor: move to use optimizeDeps.force option
bholmesdev 22ddb74
refactor: stub out new updateModuleInfo params
bholmesdev 3364daf
nit: remove comment on deprecated Vite feature
bholmesdev 257bdbf
nit: remove comment on deprecated vite feature
bholmesdev 90df3c9
hail mary: destroy all ssr external / noexternal!
bholmesdev bde086a
fix: use new middlewareMode config settings
bholmesdev fa373a7
fix: resolve npm package paths for rollup input
bholmesdev 3d52d8c
wip: revert to unresolved. Issue reported!
bholmesdev 694b3f0
sad refactor: use legacy devDepsScanner for component HMR
bholmesdev 89fa0a5
fix: add astro/components to noExternal for Code component
bholmesdev f08630b
refactor: use ALWAYS_NOEXTERNAL array
bholmesdev f69bc8c
refactor: add package.json to all test runners for noExternal error
bholmesdev 7607ec4
deps: bump to latest vite 3 beta
bholmesdev 2f00261
wip: add package.json to smoke
bholmesdev e72040a
fix: remove accidental "force true" on create-vite
bholmesdev 2c23e8c
refactor: write smoke package.json programmatically
bholmesdev 08820f1
refactor: add fontsource to noExternal
bholmesdev e3c4baa
fix: only add to ssr.noExternal if present in project
bholmesdev 94fc44e
wip: what if we just... didn't have a memory test
bholmesdev 169a9e5
deps: bump to latest vite beta
bholmesdev d825a35
Revert "wip: what if we just... didn't have a memory test"
bholmesdev 58a2258
fix: add type check for plugin.name
bholmesdev 39136c6
feat: remove legacy.devDepsScanner. Vite 3 strat is now Vite 2.x strat!
bholmesdev 1aa8d29
fix: add ssr.noExternal to components ex
bholmesdev 7d4f733
wip: ignore with-mdx starter
bholmesdev 022238b
fix: add serviceEntryPoint to ssr.noExternal
bholmesdev 5a0f51b
temp: reset NODE_ENV on prod builds
bholmesdev 08f3659
fix: missing async tag
bholmesdev f153a14
VITE 3 IS STABLE BABY
bholmesdev e334620
deps: bump svelte to vite 3
bholmesdev 0b1af9d
deps: bump vue to vite 3
bholmesdev 8d7301f
fix: resolve plugins for proper sorting
bholmesdev e1a6f5c
sad fix: regex "export default" out of CSS ssr
bholmesdev 5863fdf
chore: add TODO to understand sad fix
bholmesdev 7cc577e
Revert "fix: resolve plugins for proper sorting"
bholmesdev f417191
Revert "sad fix: regex "export default" out of CSS ssr"
bholmesdev 97920e9
fix: sort plugins WITHOUT resolveConfig
bholmesdev e626a10
Revert "wip: ignore with-mdx starter"
bholmesdev 147c9d7
chore: revert memory test changes
bholmesdev 6fd11fe
chore: add nanostores/preact ot noexternal
bholmesdev 561d4e8
chore: changeset
bholmesdev c7278e6
chore: changeset
bholmesdev 339f150
deps: use Vite ^3.0.0
bholmesdev 247494e
fix: add back third party astro pkg scanner
bholmesdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'astro': minor | ||
'@astrojs/image': minor | ||
'@astrojs/svelte': minor | ||
'@astrojs/vue': minor | ||
--- | ||
|
||
Bump to Vite 3! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import { defineConfig } from 'astro/config'; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({}); | ||
export default defineConfig({ | ||
vite: { | ||
ssr: { | ||
noExternal: ['@example/my-component'] | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@test/api-routes", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"astro": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@test/astro-response", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"astro": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@test/config-vite", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"astro": "workspace:*" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/astro/test/fixtures/fontsource-package/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { defineConfig } from 'astro/config'; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
vite: { | ||
ssr: { | ||
noExternal: [ | ||
'@fontsource/montserrat', | ||
'@fontsource/monofett', | ||
] | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@test/hmr-css", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"astro": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@test/import-ts-with-js", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"astro": "workspace:*" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Any reason to pin to
3.0.0
exactly? Should we use~3.0.0
?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.
Ack, didn't catch this! I'm using
^3.0.0
but would we prefer~3.0.0
?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.
I’m almost sure they’re following semver, but given all the noise around this release I’d be +1 to use ~ until 3.x has had some time to bake. Don’t feel too strongly tho
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.
Choosing to keep
^3.0.0
. Using~3.0.0
is one more thing to question and circle back to. I trust the Vite team here 😁