diff --git a/node-src/lib/getDependentStoryFiles.test.ts b/node-src/lib/getDependentStoryFiles.test.ts index e548839ed..97084b678 100644 --- a/node-src/lib/getDependentStoryFiles.test.ts +++ b/node-src/lib/getDependentStoryFiles.test.ts @@ -162,7 +162,11 @@ describe('getDependentStoryFiles', () => { }); }); - it('detects direct changes to CSF files, rspack', async () => { + it.each([ + [`./node_modules/.cache/storybook/default/dev-server/storybook-stories.js`], + [`./node_modules/.cache/storybook/storybook-rsbuild-builder/storybook-config-entry.js`], + [`./node_modules/.cache/storybook-rsbuild-builder/storybook-config-entry.js`], + ])('detects direct changes to CSF files, rspack (%s)', async (resolvedModule) => { const changedFiles = ['src/foo.stories.js']; const modules = [ { @@ -179,10 +183,8 @@ describe('getDependentStoryFiles', () => { id: String.raw`./src lazy recursive ^\.\/.*$`, reasons: [ { - resolvedModule: - './node_modules/.cache/storybook/default/dev-server/storybook-stories.js', - moduleName: - './node_modules/.cache/storybook/default/dev-server/storybook-stories.js + 2 modules', + resolvedModule, + moduleName: `${resolvedModule} + 2 modules`, }, ], }, diff --git a/node-src/lib/getDependentStoryFiles.ts b/node-src/lib/getDependentStoryFiles.ts index 20e6091f9..eb5504860 100644 --- a/node-src/lib/getDependentStoryFiles.ts +++ b/node-src/lib/getDependentStoryFiles.ts @@ -133,6 +133,7 @@ export async function getDependentStoryFiles( // rspack builder `./node_modules/.cache/storybook/default/dev-server/storybook-stories.js`, `./node_modules/.cache/storybook/storybook-rsbuild-builder/storybook-config-entry.js`, + `./node_modules/.cache/storybook-rsbuild-builder/storybook-config-entry.js`, ].map((file) => normalize(file)) ); diff --git a/node-src/lib/getStorybookMetadata.ts b/node-src/lib/getStorybookMetadata.ts index 3f720b7d0..a7c3a379c 100644 --- a/node-src/lib/getStorybookMetadata.ts +++ b/node-src/lib/getStorybookMetadata.ts @@ -1,4 +1,4 @@ -import { readConfig } from '@storybook/csf-tools'; +import { printConfig, readConfig } from '@storybook/csf-tools'; import { readdir } from 'fs/promises'; import { readJson } from 'fs-extra'; import meow from 'meow'; @@ -227,7 +227,7 @@ export const getStorybookMetadata = async (ctx: Context) => { } mainConfig = await readConfig(storybookConfig); - ctx.log.debug({ configDirectory, mainConfig }); + ctx.log.debug({ configDirectory, mainConfig: printConfig(mainConfig) }); v7 = true; } catch (err) { ctx.log.debug({ storybookV7error: err });