Skip to content

Commit

Permalink
refactor vite plugin export paths
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf authored and shilman committed Aug 30, 2024
1 parent 849fb20 commit 6fdc8af
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 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 @@ -194,12 +194,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.
8 changes: 4 additions & 4 deletions code/frameworks/vue3-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"require": "./dist/preset.js"
},
"./vite": {
"types": "./dist/vite.d.ts",
"require": "./dist/vite.js",
"import": "./dist/vite.mjs"
"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 @@ -374,12 +374,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 6fdc8af

Please sign in to comment.