chromaui/chromatic-cli

TurrboSnap and preview.js dependencies issue

Closed this issue · 5 comments

<How is the user affected? And what is the expected behavior?>

We use @storybook/web-components and a custom-elements.json file to document all of our Args. The custom-elements.json file changes with pretty much every commit, and because this is a dependency in preview.js, it is always disabling TurboSnap. Is there a way to ignore these changes so TurboSnap remains enabled? I've tried untraced: '**/custom-elements.js' and untraced: '**/preview.js' and it did not work.

Because of how the custom-elements.json is used in preview.js for @storybook/web-components, it is flagged as a full rebuild anytime that file changes, which is all the time. @storybook/web-components installation docs for reference: https://github.com/storybookjs/storybook/blob/next/code/addons/docs/web-components/README.md#installation

Build logs show:

Found a Storybook config change in .storybook/preview.js or one of its 4 module siblings:

2024-04-26T14:13:43.3792780Z → .storybook/DocumentationTemplate.mdx

2024-04-26T14:13:43.3793601Z → custom-elements.json

2024-04-26T14:13:43.3794545Z → .storybook/global.scss

2024-04-26T14:13:43.3795303Z → .storybook/usageBlock.jsx

But the file custom-elements.json was untraced.

<How many and/or what class of users does this impact?>

1, kyndryl.com

potentially all @storybook/web-components and a custom-elements.json users

<Is there a workaround?>

No.

<What are the steps for reproducing the issue?>

N/A

<Any other information to share?>

Logs from customer's build below:

4_Run.Chromatic.txt

hey @brian-patrick-3,
Can you add the --debug flag to your command to get more info about what Chromatic is doing, run a build, and send the output to in-app support? Thank you!

Here is a log with debug enabled: 4_Run Chromatic.txt

I have another log where TurboSnap got disabled. Is it because of the dependency update?
0_chromatic.txt

Hey, @brian-patrick-3, dependency updates may trigger a full rebuild. Learn more here.