Skip to content

Commit

Permalink
Merge pull request #20281 from storybookjs/vite/peer-dep
Browse files Browse the repository at this point in the history
Vite: Make vite a peer dependency, update plugins
  • Loading branch information
shilman authored Dec 16, 2022
2 parents 4fbb68a + 1147d80 commit 1666a69
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 78 deletions.
11 changes: 6 additions & 5 deletions code/frameworks/react-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,20 @@
"@rollup/pluginutils": "^4.2.0",
"@storybook/builder-vite": "7.0.0-beta.10",
"@storybook/react": "7.0.0-beta.10",
"@vitejs/plugin-react": "^2.0.0",
"@vitejs/plugin-react": "^3.0.0",
"ast-types": "^0.14.2",
"magic-string": "^0.26.1",
"react-docgen": "6.0.0-alpha.3",
"vite": "^3.0.0"
"react-docgen": "6.0.0-alpha.3"
},
"devDependencies": {
"@types/node": "^16.0.0",
"typescript": "~4.9.3"
"typescript": "~4.9.3",
"vite": "^4.0.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"vite": "^3.0.0 || ^4.0.0"
},
"engines": {
"node": "^14.18 || >=16"
Expand Down
11 changes: 6 additions & 5 deletions code/frameworks/svelte-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,21 @@
"@storybook/builder-vite": "7.0.0-beta.10",
"@storybook/node-logger": "7.0.0-beta.10",
"@storybook/svelte": "7.0.0-beta.10",
"@sveltejs/vite-plugin-svelte": "^1.0.0",
"@sveltejs/vite-plugin-svelte": "^2.0.0",
"magic-string": "^0.26.1",
"svelte": "^3.0.0",
"sveltedoc-parser": "^4.2.1",
"ts-dedent": "^2.2.0",
"vite": "^3.0.0"
"ts-dedent": "^2.2.0"
},
"devDependencies": {
"@types/node": "^16.0.0",
"typescript": "~4.9.3"
"typescript": "~4.9.3",
"vite": "^4.0.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"vite": "^3.0.0 || ^4.0.0"
},
"engines": {
"node": "^14.18 || >=16"
Expand Down
2 changes: 2 additions & 0 deletions code/frameworks/svelte-vite/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const core: StorybookConfig['core'] = {

export const viteFinal: NonNullable<StorybookConfig['viteFinal']> = async (config, options) => {
const { plugins = [] } = config;
// TODO: set up eslint import to use typescript resolver
// eslint-disable-next-line import/no-unresolved
const { svelte, loadSvelteConfig } = await import('@sveltejs/vite-plugin-svelte');
const svelteOptions: Record<string, any> = await options.presets.apply(
'svelteOptions',
Expand Down
6 changes: 5 additions & 1 deletion code/frameworks/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
},
"devDependencies": {
"@types/node": "^16.0.0",
"typescript": "^4.9.3"
"typescript": "^4.9.3",
"vite": "^4.0.0"
},
"peerDependencies": {
"vite": "^4.0.0"
},
"engines": {
"node": "^14.18 || >=16"
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/vue-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@
"@storybook/core-server": "7.0.0-beta.10",
"@storybook/vue": "7.0.0-beta.10",
"magic-string": "^0.26.1",
"vite": "^3.0.0",
"vue-docgen-api": "^4.40.0"
},
"devDependencies": {
"typescript": "~4.9.3",
"vite": "^4.0.0",
"vue": "^2.7.10"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"vite": "^3.0.0 || ^4.0.0",
"vue": "^2.7.0"
},
"engines": {
Expand Down
9 changes: 5 additions & 4 deletions code/frameworks/vue3-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,19 @@
"@storybook/builder-vite": "7.0.0-beta.10",
"@storybook/core-server": "7.0.0-beta.10",
"@storybook/vue3": "7.0.0-beta.10",
"@vitejs/plugin-vue": "^3.0.0",
"@vitejs/plugin-vue": "^4.0.0",
"magic-string": "^0.26.1",
"vite": "^3.0.0",
"vue-docgen-api": "^4.40.0"
},
"devDependencies": {
"@types/node": "^16.0.0",
"typescript": "~4.9.3"
"typescript": "~4.9.3",
"vite": "^4.0.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"vite": "^3.0.0 || ^4.0.0"
},
"engines": {
"node": "^14.18 || >=16"
Expand Down
7 changes: 4 additions & 3 deletions code/lib/builder-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,19 @@
"magic-string": "^0.26.1",
"rollup": "^2.25.0 || ^3.3.0",
"rollup-plugin-external-globals": "^0.7.1",
"slash": "^3.0.0",
"vite": "^3.0.0"
"slash": "^3.0.0"
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/node": "^16.0.0",
"rollup": "^3.0.0",
"typescript": "~4.9.3"
"typescript": "~4.9.3",
"vite": "^4.0.0"
},
"peerDependencies": {
"@preact/preset-vite": "*",
"typescript": ">= 4.3.x",
"vite": "^3.0.0 || ^4.0.0",
"vite-plugin-glimmerx": "*"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
"tsup": "^6.2.2",
"typescript": "~4.9.3",
"util": "^0.12.4",
"vite": "^3.0.0",
"vite": "^4.0.0",
"vite-plugin-turbosnap": "^1.0.1",
"wait-on": "^5.2.1",
"web-component-analyzer": "^1.1.6",
Expand Down
Loading

0 comments on commit 1666a69

Please sign in to comment.