Skip to content

Commit

Permalink
chore(deps): update dependency vite to v5 (main) (#24336)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
  • Loading branch information
renovate[bot] and danielroe committed Nov 23, 2023
1 parent c214869 commit e554f2b
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 151 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -35,7 +35,7 @@
"@nuxt/vite-builder": "workspace:*",
"@nuxt/webpack-builder": "workspace:*",
"nuxt": "workspace:*",
"vite": "4.5.0",
"vite": "5.0.2",
"vue": "3.3.8",
"magic-string": "^0.30.5"
},
Expand Down Expand Up @@ -75,7 +75,7 @@
"std-env": "3.5.0",
"typescript": "5.3.2",
"ufo": "1.3.2",
"vite": "4.5.0",
"vite": "5.0.2",
"vitest": "0.33.0",
"vitest-environment-nuxt": "0.11.5",
"vue": "3.3.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/package.json
Expand Up @@ -52,7 +52,7 @@
"lodash-es": "4.17.21",
"nitropack": "2.8.0",
"unbuild": "latest",
"vite": "4.5.0",
"vite": "5.0.2",
"vitest": "0.33.0",
"webpack": "5.89.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Expand Up @@ -120,7 +120,7 @@
"@types/fs-extra": "11.0.4",
"@vitejs/plugin-vue": "4.5.0",
"unbuild": "latest",
"vite": "4.5.0",
"vite": "5.0.2",
"vitest": "0.33.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/package.json
Expand Up @@ -50,7 +50,7 @@
"ofetch": "1.3.3",
"unbuild": "latest",
"unctx": "2.3.1",
"vite": "4.5.0",
"vite": "5.0.2",
"vue": "3.3.8",
"vue-bundle-renderer": "2.0.0",
"vue-loader": "17.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Expand Up @@ -61,7 +61,7 @@
"strip-literal": "^1.3.0",
"ufo": "^1.3.2",
"unplugin": "^1.5.1",
"vite": "^4.5.0",
"vite": "^5.0.2",
"vite-node": "^0.33.0",
"vite-plugin-checker": "^0.6.2",
"vue-bundle-renderer": "^2.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/vite/src/plugins/analyze.ts
Expand Up @@ -24,7 +24,6 @@ export function analyzePlugin (ctx: ViteBuildContext): Plugin[] {
}
}
},
// @ts-expect-error rollup 4 types
visualizer({
...analyzeOptions,
filename: 'filename' in analyzeOptions ? analyzeOptions.filename!.replace('{name}', 'client') : undefined,
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/server.ts
Expand Up @@ -97,6 +97,7 @@ export async function buildServer (ctx: ViteBuildContext) {
hmr: false
},
plugins: [
// @ts-expect-error types not compatible yet in `@rollup/plugin-replace`
replace({
values: {
'typeof window': '"undefined"',
Expand Down
2 changes: 2 additions & 0 deletions packages/vite/src/vite.ts
Expand Up @@ -103,6 +103,7 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => {
rootDir: nuxt.options.rootDir,
composables: nuxt.options.optimization.keyedComposables
}),
// @ts-expect-error types not compatible yet in `@rollup/plugin-replace`
replace({
...Object.fromEntries([';', '(', '{', '}', ' ', '\t', '\n'].map(d => [`${d}global.`, `${d}globalThis.`])),
preventAssignment: true
Expand Down Expand Up @@ -152,6 +153,7 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => {
await nuxt.callHook('vite:extend', ctx)

nuxt.hook('vite:extendConfig', (config) => {
// @ts-expect-error types not compatible yet in `@rollup/plugin-replace`
config.plugins!.push(replace({
preventAssignment: true,
...Object.fromEntries(Object.entries(config.define!).filter(([key]) => key.startsWith('import.meta.')))
Expand Down

0 comments on commit e554f2b

Please sign in to comment.