Skip to content

Commit

Permalink
Merge pull request #29016 from storybookjs/yann/rename-vite-plugin-ex…
Browse files Browse the repository at this point in the history
…ports

Maintenance: Refactor plugin export paths in SvelteKit and Vue3
  • Loading branch information
yannbf authored Sep 2, 2024
2 parents 56b28c0 + 82cf64d commit 411c3cc
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
5 changes: 3 additions & 2 deletions code/addons/vitest/src/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,13 @@ const getVitestPluginInfo = (framework: string) => {
}

if (framework === '@storybook/sveltekit') {
frameworkPluginImport = "import { storybookSveltekitPlugin } from '@storybook/sveltekit/vite'";
frameworkPluginImport =
"import { storybookSveltekitPlugin } from '@storybook/sveltekit/vite-plugin'";
frameworkPluginCall = 'storybookSveltekitPlugin()';
}

if (framework === '@storybook/vue3-vite') {
frameworkPluginImport = "import { storybookVuePlugin } from '@storybook/vue3-vite/vite'";
frameworkPluginImport = "import { storybookVuePlugin } from '@storybook/vue3-vite/vite-plugin'";
frameworkPluginCall = 'storybookVuePlugin()';
}

Expand Down
10 changes: 5 additions & 5 deletions code/frameworks/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"types": "./dist/preset.d.ts",
"require": "./dist/preset.js"
},
"./vite": {
"types": "./dist/vite.d.ts",
"require": "./dist/vite.js",
"import": "./dist/vite.mjs"
"./vite-plugin": {
"types": "./dist/vite-plugin.d.ts",
"require": "./dist/vite-plugin.js",
"import": "./dist/vite-plugin.mjs"
},
"./package.json": "./package.json"
},
Expand Down Expand Up @@ -84,7 +84,7 @@
"./src/index.ts",
"./src/preview.ts",
"./src/preset.ts",
"./src/vite.ts"
"./src/vite-plugin.ts"
],
"platform": "node"
},
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions code/frameworks/vue3-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"types": "./dist/preset.d.ts",
"require": "./dist/preset.js"
},
"./vite": {
"types": "./dist/vite.d.ts",
"require": "./dist/vite.js",
"import": "./dist/vite.mjs"
"./vite-plugin": {
"types": "./dist/vite-plugin.d.ts",
"require": "./dist/vite-plugin.js",
"import": "./dist/vite-plugin.mjs"
},
"./package.json": "./package.json"
},
Expand Down Expand Up @@ -80,7 +80,7 @@
"entries": [
"./src/index.ts",
"./src/preset.ts",
"./src/vite.ts"
"./src/vite-plugin.ts"
],
"platform": "node"
},
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions scripts/tasks/sandbox-parts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,13 @@ const getVitestPluginInfo = (details: TemplateDetails) => {
}

if (isSveltekit) {
frameworkPluginImport = "import { storybookSveltekitPlugin } from '@storybook/sveltekit/vite'";
frameworkPluginImport =
"import { storybookSveltekitPlugin } from '@storybook/sveltekit/vite-plugin'";
frameworkPluginCall = 'storybookSveltekitPlugin()';
}

if (framework === '@storybook/vue3-vite') {
frameworkPluginImport = "import { storybookVuePlugin } from '@storybook/vue3-vite/vite'";
frameworkPluginImport = "import { storybookVuePlugin } from '@storybook/vue3-vite/vite-plugin'";
frameworkPluginCall = 'storybookVuePlugin()';
}

Expand Down

0 comments on commit 411c3cc

Please sign in to comment.