Skip to content

Commit

Permalink
feat: support vite 5
Browse files Browse the repository at this point in the history
  • Loading branch information
chizukicn committed Nov 20, 2023
1 parent 92021c9 commit 3214206
Show file tree
Hide file tree
Showing 11 changed files with 1,012 additions and 513 deletions.
2 changes: 1 addition & 1 deletion bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"@types/cli-table": "^0.3.4",
"@types/inquirer": "^9.0.7",
"@types/koa": "^2.13.11",
"tsx": "^4.1.2"
"tsx": "^4.1.4"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
"@fourze/server": "workspace:*",
"@fourze/swagger": "workspace:*",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.9.0",
"@types/node": "^20.9.2",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/ui": "^0.34.6",
"autocannon": "^7.12.0",
"bumpp": "^9.2.0",
"chokidar": "^3.5.3",
"eslint": "^8.53.0",
"eslint": "^8.54.0",
"eslint-formatter-mo": "^1.2.0",
"jsdom": "^22.1.0",
"lint-staged": "^15.1.0",
Expand All @@ -61,7 +61,7 @@
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"taze": "^0.12.0",
"tsx": "^4.1.2",
"tsx": "^4.1.4",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vitest": "^0.34.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/swagger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"stub": "unbuild --stub"
},
"peerDependencies": {
"vite": "^4.5.0"
"vite": "^4.5.0 || ^5.0.0"
},
"peerDependenciesMeta": {
"vite": {
Expand Down
10 changes: 5 additions & 5 deletions packages/integrations/unplugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"stub": "unbuild --stub"
},
"peerDependencies": {
"vite": "^4.5.0"
"vite": "^4.5.0 || ^5.0.0"
},
"peerDependenciesMeta": {
"vite": {
Expand All @@ -36,13 +36,13 @@
"dedent": "^1.5.1",
"fs-extra": "^11.1.1",
"ufo": "^1.3.2",
"unplugin": "^1.5.0"
"unplugin": "^1.5.1"
},
"devDependencies": {
"@types/webpack": "^5.28.5",
"esbuild": "^0.19.5",
"rollup": "^4.4.1",
"vite": "^4.5.0",
"esbuild": "^0.19.6",
"rollup": "^4.5.0",
"vite": "^5.0.0",
"webpack": "^5.89.0",
"webpack-dev-server": "^4.15.1"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/unplugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ const createFourzePlugin = createUnplugin<UnpluginFourzeOptions | undefined>(

vite: {
transformIndexHtml: {
enforce: "pre",
transform(html) {
order: "pre",
handler(html) {
if (mockOptions.enable && injectScript) {
return {
html,
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"stub": "unbuild --stub"
},
"peerDependencies": {
"vite": "^4.5.0"
"vite": "^4.5.0 || ^5.0.0"
},
"peerDependenciesMeta": {
"vite": {
Expand All @@ -31,6 +31,6 @@
"@fourze/unplugin": "workspace:*"
},
"devDependencies": {
"vite": "^4.5.0"
"vite": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@fourze/core": "workspace:*",
"chokidar": "^3.5.3",
"create-require": "^1.1.1",
"esbuild": "^0.19.5",
"esbuild": "^0.19.6",
"fast-glob": "^3.3.2",
"fs-extra": "^11.1.1",
"micromatch": "^4.0.5",
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/nuxt-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"devDependencies": {
"@fourze/middlewares": "workspace:*",
"@fourze/nuxt": "workspace:*",
"@unocss/nuxt": "^0.57.4",
"@unocss/nuxt": "^0.57.6",
"fs-extra": "^11.1.1",
"nuxt": "3.8.1",
"pathe": "^1.1.1"
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/ejs": "^3.1.5",
"@types/express": "^4.17.21",
"ejs": "^3.1.9",
"esbuild": "^0.19.5",
"esbuild": "^0.19.6",
"http-proxy-middleware": "^2.0.6"
}
}
8 changes: 4 additions & 4 deletions playgrounds/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"@fourze/mock": "workspace:*",
"@fourze/vite": "workspace:*",
"@types/jquery": "^3.5.27",
"@vitejs/plugin-vue": "^4.4.1",
"@vitejs/plugin-vue-jsx": "^3.0.2",
"@vitejs/plugin-vue": "^4.5.0",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"compression": "^1.7.4",
"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.69.5",
"typescript": "^5.2.2",
"unocss": "^0.57.4",
"unocss": "^0.57.6",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.5.0",
"vite": "^5.0.0",
"vite-plugin-inspect": "^0.7.42"
}
}
Loading

0 comments on commit 3214206

Please sign in to comment.