Skip to content

Commit

Permalink
feat: update to vite 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Apr 11, 2023
1 parent c62fc6a commit df3067d
Show file tree
Hide file tree
Showing 19 changed files with 139 additions and 81 deletions.
2 changes: 1 addition & 1 deletion examples/svelte3/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.14.0",
"svelte-preprocess": "^4.10.7",
"vite": "^4.1.0"
"vite": "^4.2.0"
}
}
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.3.1",
"typescript": "^4.9.5",
"vite": "^4.1.0"
"vite": "^4.2.0"
}
}
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.1.0",
"histoire": "workspace:*",
"vite": "^4.1.0",
"vite": "^4.2.0",
"vue-template-compiler": "^2.7.8"
}
}
2 changes: 1 addition & 1 deletion examples/vue3-percy/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.0.0",
"histoire": "workspace:*",
"vite": "^4.1.0"
"vite": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/vue3-screenshot/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.0.0",
"histoire": "workspace:*",
"vite": "^4.1.0"
"vite": "^4.2.0"
}
}
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 @@
"@vitejs/plugin-vue": "^4.0.0",
"@histoire/plugin-vue": "workspace:*",
"histoire": "workspace:*",
"vite": "^4.1.0"
"vite": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"nodemon": "^2.0.20",
"sass": "^1.50.0",
"start-server-and-test": "^1.14.0",
"vite": "^4.1.0"
"vite": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/histoire-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"postcss-import": "^14.1.0",
"tailwindcss": "^3.0.23",
"typescript": "^4.9.5",
"vite": "^4.1.0",
"vite": "^4.2.0",
"vue": "^3.2.47"
}
}
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.0.0",
"histoire": "workspace:*",
"vite": "^4.1.0"
"vite": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/histoire-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"postcss-import": "^14.1.0",
"tailwindcss": "^3.0.23",
"typescript": "^4.9.5",
"vite": "^4.1.0",
"vite": "^4.2.0",
"vue": "^3.2.47",
"vue-tsc": "^1.0.24"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-plugin-nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@nuxt/schema": "^3.0.0-rc.11",
"histoire": "workspace:*",
"typescript": "^4.9.5",
"vite": "^4.1.0"
"vite": "^4.2.0"
},
"peerDependencies": {
"@histoire/plugin-vue": "^0.15.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-plugin-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"histoire": "workspace:*",
"svelte": "^3.49.0",
"svelte-preprocess": "^4.10.7",
"vite": "^4.1.0"
"vite": "^4.2.0"
},
"peerDependencies": {
"histoire": "^0.15.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-plugin-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"concurrently": "^7.1.0",
"typescript": "^4.9.5",
"histoire": "workspace:*",
"vite": "^4.1.0",
"vite": "^4.2.0",
"vue": "^3.2.47"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-plugin-vue/src/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function HstVue (): Plugin {
enforce: 'post',
transform (code, id) {
// Remove vue warnings about unknown components
if (this.meta.histoire?.isCollecting && id.endsWith('.vue')) {
if ((this.meta as any).histoire?.isCollecting && id.endsWith('.vue')) {
return `const _stubComponent = (name) => ['Story','Variant'].includes(name) ? _resolveComponent(name) : ({ render: () => null });${code?.replaceAll('_resolveComponent(', '_stubComponent(') ?? ''}`
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire-plugin-vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"globby": "^13.1.1",
"histoire": "workspace:*",
"typescript": "^4.9.5",
"vite": "^4.1.0",
"vite": "^4.2.0",
"vue": "^2.7.8"
},
"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.1.0"
"vite": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/histoire/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@
"@types/node": "^17.0.32",
"rollup": "^3.5.1",
"typescript": "^4.9.5",
"vite": "^4.1.0"
"vite": "^4.2.0"
}
}
1 change: 1 addition & 0 deletions packages/histoire/src/node/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export async function getViteConfigWithPlugins (isServer: boolean, ctx: Context)
},

options () {
// @ts-ignore
this.meta.histoire = {
isCollecting: isServer,
}
Expand Down
Loading

0 comments on commit df3067d

Please sign in to comment.