Skip to content

Commit

Permalink
build: use @storybook-vue/nuxt
Browse files Browse the repository at this point in the history
  • Loading branch information
jojomatik committed Jul 29, 2023
1 parent 985c7c5 commit 34168ec
Show file tree
Hide file tree
Showing 3 changed files with 273 additions and 61 deletions.
14 changes: 2 additions & 12 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import path from "path";
import type { StorybookConfig } from "@storybook/vue3-vite";
import { ConfigEnv, loadConfigFromFile, mergeConfig } from "vite";
import type { StorybookConfig } from "@storybook-vue/nuxt";

const config: StorybookConfig = {
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
Expand All @@ -10,7 +8,7 @@ const config: StorybookConfig = {
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/vue3-vite",
name: "@storybook-vue/nuxt",
options: {},
},
core: {
Expand All @@ -19,14 +17,6 @@ const config: StorybookConfig = {
docs: {
autodocs: true,
},
async viteFinal(baseConfig) {
const loaded = await loadConfigFromFile(
path.resolve(__dirname, "vite.config.ts") as unknown as ConfigEnv
);
if (!loaded) return baseConfig;
const userConfig = loaded.config;
return mergeConfig(baseConfig, userConfig);
},
};

export default config;
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"@nuxtjs/i18n": "^8.0.0-beta.12",
"@nuxtjs/robots": "^3.0.0",
"@storybook-vue/nuxt": "^0.0.1-rc.3",
"@storybook/addon-essentials": "7.1.0",
"@storybook/addon-interactions": "7.1.0",
"@storybook/addon-links": "7.1.0",
"@storybook/blocks": "7.1.0",
"@storybook/testing-library": "0.2.0",
"@storybook/vue3": "7.1.0",
"@storybook/vue3-vite": "7.1.0",
"@types/node": "^18.16.19",
"@unhead/vue": "^1.1.26",
"chromatic": "^6.20.0",
Expand Down
Loading

0 comments on commit 34168ec

Please sign in to comment.