-
Notifications
You must be signed in to change notification settings - Fork 36
Vite v8 #1526
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
Merged
Merged
Vite v8 #1526
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
fd5e341
initial migration
williamlark 62c507c
update vite react
williamlark 82f0fda
fix css externalising
williamlark 77e684c
fix cjs error
williamlark 415937e
updating tests
williamlark e8671e0
comments
williamlark e479736
update polyfill plugin
williamlark ac9c527
updating vocab to snapshot
williamlark 045f9a3
updating rollup-plugin-visualizer
williamlark 0b40053
adding changeset
williamlark 0cca18d
remove experimentalMinChunkSize
williamlark 229c07b
bumping vocab
williamlark 78a0f01
cleanup
williamlark 2602107
fixing ve problem
williamlark 0596f99
updating ve deps
williamlark 2b0f59d
removing unused package
williamlark 374e5a7
updating snapshots
williamlark 8bf5874
bump ve vite plugin
williamlark 78f8b89
updated changeset wording
williamlark f7965e2
update snapshots
williamlark 0d411ad
adding update command to changeset
williamlark 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 hidden or 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,5 @@ | ||
| --- | ||
| '@sku-lib/vite': major | ||
| --- | ||
|
|
||
| Dropped vite@7 support. Minimum version bumped to vite@8. |
This file contains hidden or 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,5 @@ | ||
| --- | ||
| 'sku': patch | ||
| --- | ||
|
|
||
| Updated minimum versions of dependencies to address security vulnerabilities |
This file contains hidden or 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 @@ | ||
| --- | ||
| 'sku': minor | ||
| --- | ||
|
|
||
| Bumping vite version to vite@8 | ||
|
|
||
| This update should not affect most applications, unless you have specified unsupported vite@8 options via `dangerouslySetViteConfig`. Since this API is subject to potential changes, this is a minor (not breaking) release. | ||
|
|
||
| If your app relies on `@sku-lib/vite`, please ensure you upgrade to at least version 2.0.0. | ||
|
|
||
| ``` | ||
| pnpm update @sku-lib/vite^2.0.0 | ||
| ``` | ||
This file contains hidden or 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 hidden or 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,5 +1,7 @@ | ||
| import { makeStableViteHashes } from '@sku-private/test-utils'; | ||
| import type { SkuConfig } from 'sku'; | ||
|
|
||
| export default { | ||
| bundler: 'vite', | ||
| dangerouslySetViteConfig: makeStableViteHashes, | ||
| } satisfies SkuConfig; |
This file contains hidden or 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 hidden or 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,5 +1,7 @@ | ||
| import { makeStableViteHashes } from '@sku-private/test-utils'; | ||
| import type { SkuConfig } from 'sku'; | ||
|
|
||
| export default { | ||
| bundler: 'vite', | ||
| dangerouslySetViteConfig: makeStableViteHashes, | ||
| } satisfies SkuConfig; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
27 changes: 19 additions & 8 deletions
27
packages/sku/src/services/vite/plugins/esbuild/fixViteVanillaExtractDepScanPlugin.ts
This file contains hidden or 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,17 +1,28 @@ | ||
| import type { Plugin } from 'esbuild'; | ||
| import type { RolldownPluginOption } from 'rolldown'; | ||
| import { cssFileFilter } from '@vanilla-extract/integration'; | ||
| import { makePluginName } from '../../helpers/makePluginName.js'; | ||
| import { dirname } from 'node:path'; | ||
| import { createRequire } from 'node:module'; | ||
| import { makePluginName } from '../../helpers/makePluginName.js'; | ||
|
|
||
| const require = createRequire(import.meta.url); | ||
|
|
||
| export const fixViteVanillaExtractDepScanPlugin = (): Plugin => ({ | ||
| export const fixViteVanillaExtractDepScanPlugin = (): RolldownPluginOption => ({ | ||
| name: makePluginName('fix-vanilla-extract-dep-scan'), | ||
| setup(build) { | ||
| build.onResolve({ filter: cssFileFilter }, ({ importer, path }) => ({ | ||
| path: require.resolve(path, { paths: [dirname(importer)] }), | ||
| external: true, | ||
| })); | ||
|
|
||
| resolveId: { | ||
| filter: { | ||
| id: cssFileFilter, | ||
| }, | ||
| handler: (source, importer) => { | ||
| const id = require.resolve(source, { | ||
| paths: importer ? [dirname(importer)] : undefined, | ||
| }); | ||
|
|
||
| return { | ||
| id, | ||
| // keep the absolute path of the css file so its externalized correctly. | ||
| external: 'absolute', | ||
| }; | ||
| }, | ||
| }, | ||
| }); |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.