From 83d2cc2f400fb66693f56cd7f587ed5676c28234 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Wed, 18 Oct 2023 23:28:05 +0300 Subject: [PATCH] fix(storybook): do not restrict to components dir for vue (#19680) --- .../__snapshots__/configuration.spec.ts.snap | 2 +- .../src/generators/configuration/lib/util-functions.ts | 2 +- .../__snapshots__/configuration.spec.ts.snap | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nuxt/src/generators/storybook-configuration/__snapshots__/configuration.spec.ts.snap b/packages/nuxt/src/generators/storybook-configuration/__snapshots__/configuration.spec.ts.snap index 7b7a17b4f2704..e293df068a7d7 100644 --- a/packages/nuxt/src/generators/storybook-configuration/__snapshots__/configuration.spec.ts.snap +++ b/packages/nuxt/src/generators/storybook-configuration/__snapshots__/configuration.spec.ts.snap @@ -7,7 +7,7 @@ import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; import { mergeConfig } from 'vite'; const config: StorybookConfig = { - stories: ['../src/components/**/*.stories.@(js|jsx|ts|tsx|mdx)'], + stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: ['@storybook/addon-essentials', '@storybook/addon-interactions'], framework: { name: '@storybook/vue3-vite', diff --git a/packages/storybook/src/generators/configuration/lib/util-functions.ts b/packages/storybook/src/generators/configuration/lib/util-functions.ts index 67e525de3f014..2807cbc070124 100644 --- a/packages/storybook/src/generators/configuration/lib/util-functions.ts +++ b/packages/storybook/src/generators/configuration/lib/util-functions.ts @@ -546,7 +546,7 @@ export function createProjectStorybookDir( : 'src/lib'; if (uiFramework === '@storybook/vue3-vite') { - projectDirectory = 'src/components'; + projectDirectory = 'src'; } const storybookConfigExists = projectIsRootProjectInStandaloneWorkspace diff --git a/packages/vue/src/generators/storybook-configuration/__snapshots__/configuration.spec.ts.snap b/packages/vue/src/generators/storybook-configuration/__snapshots__/configuration.spec.ts.snap index b76939391c21d..8e491417b33f6 100644 --- a/packages/vue/src/generators/storybook-configuration/__snapshots__/configuration.spec.ts.snap +++ b/packages/vue/src/generators/storybook-configuration/__snapshots__/configuration.spec.ts.snap @@ -7,7 +7,7 @@ import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; import { mergeConfig } from 'vite'; const config: StorybookConfig = { - stories: ['../src/components/**/*.stories.@(js|jsx|ts|tsx|mdx)'], + stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: ['@storybook/addon-essentials', '@storybook/addon-interactions'], framework: { name: '@storybook/vue3-vite',