Skip to content

Commit

Permalink
feat(bundler-vite): bump to vite 2.9 (close #781)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Mar 31, 2022
1 parent 6600a8c commit 7b3e88e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/@vuepress/bundler-vite/package.json
Expand Up @@ -40,7 +40,7 @@
"postcss": "^8.4.12",
"postcss-csso": "^6.0.0",
"rollup": "^2.70.1",
"vite": "~2.8.6",
"vite": "~2.9.1",
"vue": "^3.2.31",
"vue-router": "^4.0.14"
},
Expand Down
@@ -1,4 +1,4 @@
import type { DepOptimizationMetadata, Plugin, ViteDevServer } from 'vite'
import type { OptimizedDeps, Plugin, ViteDevServer } from 'vite'

/**
* Vite will inject version hash into file queries, which does not work
Expand All @@ -7,9 +7,7 @@ import type { DepOptimizationMetadata, Plugin, ViteDevServer } from 'vite'
* As a workaround, we remove the version hash to avoid the injection.
*/
export const createWorkaroundPlugin = (): Plugin => {
let server:
| (ViteDevServer & { _optimizeDepsMetadata?: DepOptimizationMetadata })
| null
let server: (ViteDevServer & { _optimizedDeps?: OptimizedDeps }) | null
return {
name: 'vuepress:workaround',

Expand All @@ -20,8 +18,8 @@ export const createWorkaroundPlugin = (): Plugin => {
},

resolveId() {
if (server?._optimizeDepsMetadata?.browserHash) {
server._optimizeDepsMetadata.browserHash = ''
if (server?._optimizedDeps?.metadata.browserHash) {
server._optimizedDeps.metadata.browserHash = ''
}
return null
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@vuepress/client/package.json
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@types/webpack-env": "^1.16.3",
"vite": "~2.8.6"
"vite": "~2.9.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/@vuepress/plugin-search/package.json
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@types/webpack-env": "^1.16.3",
"vite": "~2.8.6"
"vite": "~2.9.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/@vuepress/plugin-theme-data/package.json
Expand Up @@ -38,7 +38,7 @@
},
"devDependencies": {
"@types/webpack-env": "^1.16.3",
"vite": "~2.8.6"
"vite": "~2.9.1"
},
"publishConfig": {
"access": "public"
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Expand Up @@ -5039,7 +5039,7 @@ esbuild-windows-arm64@0.14.29:
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.29.tgz#0aa7a9a1bc43a63350bcf574d94b639176f065b5"
integrity sha512-+O/PI+68fbUZPpl3eXhqGHTGK7DjLcexNnyJqtLZXOFwoAjaXlS5UBCvVcR3o2va+AqZTj8o6URaz8D2K+yfQQ==

esbuild@^0.14.14, esbuild@^0.14.29, esbuild@^0.14.6:
esbuild@^0.14.27, esbuild@^0.14.29, esbuild@^0.14.6:
version "0.14.29"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.29.tgz#24ad09c0674cbcb4aa2fe761485524eb1f6b1419"
integrity sha512-SQS8cO8xFEqevYlrHt6exIhK853Me4nZ4aMW6ieysInLa0FMAL+AKs87HYNRtR2YWRcEIqoXAHh+Ytt5/66qpg==
Expand Down Expand Up @@ -8798,7 +8798,7 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==

postcss@^8.1.10, postcss@^8.4.12, postcss@^8.4.6, postcss@^8.4.7:
postcss@^8.1.10, postcss@^8.4.12, postcss@^8.4.7:
version "8.4.12"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905"
integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==
Expand Down Expand Up @@ -10711,13 +10711,13 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"

vite@~2.8.6:
version "2.8.6"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.8.6.tgz#32d50e23c99ca31b26b8ccdc78b1d72d4d7323d3"
integrity sha512-e4H0QpludOVKkmOsRyqQ7LTcMUDF3mcgyNU4lmi0B5JUbe0ZxeBBl8VoZ8Y6Rfn9eFKYtdXNPcYK97ZwH+K2ug==
vite@~2.9.1:
version "2.9.1"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.1.tgz#84bce95fae210a7beb566a0af06246748066b48f"
integrity sha512-vSlsSdOYGcYEJfkQ/NeLXgnRv5zZfpAsdztkIrs7AZHV8RCMZQkwjo4DS5BnrYTqoWqLoUe1Cah4aVO4oNNqCQ==
dependencies:
esbuild "^0.14.14"
postcss "^8.4.6"
esbuild "^0.14.27"
postcss "^8.4.12"
resolve "^1.22.0"
rollup "^2.59.0"
optionalDependencies:
Expand Down

0 comments on commit 7b3e88e

Please sign in to comment.