Skip to content

Commit

Permalink
feat: Support Vite 5.0 (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbud authored Jan 15, 2024
1 parent 90c793d commit 0167c43
Show file tree
Hide file tree
Showing 26 changed files with 1,443 additions and 541 deletions.
2 changes: 1 addition & 1 deletion examples/svelte4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
"histoire": "workspace:*",
"start-server-and-test": "^1.15.4",
"svelte-preprocess": "^5.1.0",
"vite": "^4.5.0"
"vite": "^5.0.7"
}
}
2 changes: 1 addition & 1 deletion examples/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"svelte-preprocess": "^4.10.7",
"tslib": "^2.6.2",
"typescript": "^4.9.5",
"vite": "^4.5.0"
"vite": "^5.0.7"
}
}
2 changes: 1 addition & 1 deletion examples/vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@histoire/plugin-vue2": "workspace:*",
"@vitejs/plugin-vue2": "^2.3.1",
"histoire": "workspace:*",
"vite": "^4.5.0",
"vite": "^5.0.7",
"vue-template-compiler": "^2.7.15"
}
}
5 changes: 3 additions & 2 deletions examples/vue3-percy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "histoire-example-vue3-percy",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"story:dev": "histoire dev",
"story:build": "histoire build",
Expand All @@ -15,6 +16,6 @@
"@histoire/plugin-vue": "workspace:*",
"@vitejs/plugin-vue": "^4.5.0",
"histoire": "workspace:*",
"vite": "^4.5.0"
"vite": "^5.0.7"
}
}
}
File renamed without changes.
5 changes: 3 additions & 2 deletions examples/vue3-screenshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "histoire-example-vue3-screenshot",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"story:dev": "histoire dev",
"story:build": "histoire build",
Expand All @@ -15,6 +16,6 @@
"@histoire/plugin-vue": "workspace:*",
"@vitejs/plugin-vue": "^4.5.0",
"histoire": "workspace:*",
"vite": "^4.5.0"
"vite": "^5.0.7"
}
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/vue3-themed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"@histoire/plugin-vue": "workspace:*",
"@vitejs/plugin-vue": "^4.5.0",
"histoire": "workspace:*",
"vite": "^4.5.0"
"vite": "^5.0.7"
}
}
15 changes: 8 additions & 7 deletions examples/vue3-vuetify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
"name": "histoire-example-vue3-vuetify",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"story:dev": "histoire dev",
"story:build": "histoire build",
"story:preview": "histoire preview"
},
"dependencies": {
"@mdi/font": "^5.9.55",
"vue": "^3.3.8",
"vuetify": "^3.4.2"
"@mdi/font": "^7.3.67",
"vue": "^3.3.11",
"vuetify": "^3.4.6"
},
"devDependencies": {
"@histoire/plugin-vue": "workspace:*",
"@vitejs/plugin-vue": "^2.3.4",
"@vitejs/plugin-vue": "^4.5.2",
"histoire": "workspace:*",
"vite": "^4.5.0",
"vite-plugin-vuetify": "1.0.0-alpha.12"
"vite": "^5.0.7",
"vite-plugin-vuetify": "1.0.2"
}
}
}
File renamed without changes.
5 changes: 3 additions & 2 deletions examples/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "histoire-example-vue3",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"dev:hst": "nodemon --watch ../../packages/histoire/dist --watch ../../packages/histoire-plugin-vue/dist --exec \"rm -rf ./node_modules/.hst* && HISTOIRE_DEV=true histoire dev\"",
"story:dev": "histoire dev",
Expand Down Expand Up @@ -31,6 +32,6 @@
"nodemon": "^2.0.22",
"sass": "^1.69.5",
"start-server-and-test": "^1.15.4",
"vite": "^4.5.0"
"vite": "^5.0.7"
}
}
}
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/histoire-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
"@types/fs-extra": "^9.0.13",
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"@vitejs/plugin-vue": "^4.5.0",
"autoprefixer": "^10.4.16",
"chokidar": "^3.5.3",
Expand All @@ -51,7 +51,7 @@
"postcss-import": "^14.1.0",
"tailwindcss": "^3.3.5",
"typescript": "^4.9.5",
"vite": "^4.5.0",
"vite": "^5.0.7",
"vue": "^3.3.8"
}
}
2 changes: 1 addition & 1 deletion packages/histoire-controls-stories/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"@histoire/plugin-vue": "workspace:*",
"@vitejs/plugin-vue": "^4.5.0",
"histoire": "workspace:*",
"vite": "^4.5.0"
"vite": "^5.0.7"
}
}
4 changes: 2 additions & 2 deletions packages/histoire-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@histoire/vendors": "workspace:^"
},
"devDependencies": {
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"@vitejs/plugin-vue": "^4.5.0",
"@vue/runtime-dom": "^3.3.8",
"@vue/test-utils": "^2.4.2",
Expand All @@ -64,7 +64,7 @@
"postcss-import": "^14.1.0",
"tailwindcss": "^3.3.5",
"typescript": "^4.9.5",
"vite": "^4.5.0",
"vite": "^5.0.7",
"vitest": "^0.34.6",
"vue": "^3.3.8",
"vue-tsc": "^1.8.22"
Expand Down
4 changes: 2 additions & 2 deletions packages/histoire-plugin-nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
},
"devDependencies": {
"@nuxt/schema": "^3.8.2",
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"histoire": "workspace:*",
"typescript": "^4.9.5",
"vite": "^4.5.0"
"vite": "^5.0.7"
},
"peerDependencies": {
"@histoire/plugin-vue": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-plugin-percy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"puppeteer": "^13.7.0"
},
"devDependencies": {
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"histoire": "workspace:*",
"typescript": "^4.9.5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-plugin-screenshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"pathe": "^1.1.1"
},
"devDependencies": {
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"histoire": "workspace:*",
"typescript": "^4.9.5"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/histoire-plugin-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^1.4.0",
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"concurrently": "^7.6.0",
"fs-extra": "^10.1.0",
"globby": "^13.1.1",
"histoire": "workspace:*",
"svelte": "^4.2.7",
"svelte-preprocess": "^4.10.7",
"typescript": "^4.9.5",
"vite": "^4.5.0"
"vite": "^5.0.7"
},
"peerDependencies": {
"histoire": "workspace:^",
Expand Down
6 changes: 3 additions & 3 deletions packages/histoire-plugin-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
"pathe": "^1.1.1"
},
"devDependencies": {
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"concurrently": "^7.6.0",
"histoire": "workspace:*",
"typescript": "^4.9.5",
"vite": "^4.5.0",
"vite": "^5.0.7",
"vue": "^3.3.8"
},
"peerDependencies": {
"histoire": "workspace:^",
"vue": "^3.2.47"
}
}
}
4 changes: 2 additions & 2 deletions packages/histoire-plugin-vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
"@histoire/vendors": "workspace:^"
},
"devDependencies": {
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"change-case": "^4.1.2",
"concurrently": "^7.6.0",
"globby": "^13.2.2",
"histoire": "workspace:*",
"typescript": "^4.9.5",
"vite": "^4.5.0",
"vite": "^5.0.7",
"vue": "^2.7.15"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
},
"devDependencies": {
"typescript": "^4.9.5",
"vite": "^4.5.0"
"vite": "^5.0.7"
}
}
4 changes: 2 additions & 2 deletions packages/histoire-vendors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"@iconify/vue": "^3.2.1",
"@rollup/plugin-commonjs": "^23.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/node": "^18.18.11",
"@types/node": "^18.11.9",
"@vueuse/core": "^9.13.0",
"execa": "^6.1.0",
"floating-vue": "2.0.0-beta.19",
"fs-extra": "^10.1.0",
"globby": "^13.2.2",
"pinia": "^2.1.7",
"rollup": "^3.29.4",
"rollup": "^4.8.0",
"rollup-plugin-typescript2": "^0.34.1",
"scroll-into-view-if-needed": "^2.2.31",
"typescript": "^4.9.5",
Expand Down
10 changes: 5 additions & 5 deletions packages/histoire/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@
"vite-node": "^0.34.6"
},
"peerDependencies": {
"vite": "^2.9.0 || ^3.0.0 || ^4.0.0"
"vite": "^2.9.0 || ^3.0.0 || ^4.0.0 || ^5.0.0"
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/markdown-it": "^12.2.3",
"@types/micromatch": "^4.0.6",
"@types/node": "^17.0.45",
"@types/node": "^18.11.9",
"esbuild": "^0.18.20",
"rollup": "^3.29.4",
"rollup": "^4.8.0",
"typescript": "^4.9.5",
"vite": "^4.5.0",
"vite": "^5.0.7",
"vitest": "^0.34.6"
}
}
}
3 changes: 0 additions & 3 deletions packages/histoire/src/node/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ export async function getViteConfigWithPlugins (isServer: boolean, ctx: Context)
? {
// Force resolving deps like Node.JS resolution algorithm (in case some modules are not loaded with ssr: true e.g. .vue files)
conditions: ['node'],
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
// @ts-ignore we support Vite ^3.0, but browserField is available in Vite ^3.2
browserField: false,
}
: {}),
},
Expand Down
Loading

0 comments on commit 0167c43

Please sign in to comment.