Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turbosnap does not trigger full rebuild when storybook config changes #862

Open
joshuajaco opened this issue Nov 22, 2023 · 1 comment
Open
Labels
bug Classification: Something isn't working needs triage Tracking: Issue needs confirmation

Comments

@joshuajaco
Copy link

joshuajaco commented Nov 22, 2023

Bug report

According to the docs, changes to either .storybook/main.ts or .storybook/preview.ts should trigger a full rebuild.

However in our setup (pnpm monorepo + typescript + react) it does not trigger a rebuild.

I've created a reproduction, with 3 PR's demonstrating the issue:

  • #3 shows turbosnap working when changing a source file
  • #1 shows turbosnap NOT working when changing preview.ts
  • #4 shows turbosnap NOT working when changing main.ts
@joshuajaco joshuajaco added bug Classification: Something isn't working needs triage Tracking: Issue needs confirmation labels Nov 22, 2023
@bradleyayers
Copy link

I'm experiencing a similar thing, but in my case I have the following file structure:

.
├── .storybook
│   ├── main.ts
│   ├── preview-head.html
│   └── preview.ts
├── package.json
├── ...<snip>...
├── src
│   └── ...<snip>...
├── tsconfig.json
└── webpack.config.ts

Inside .storybook/main.ts is an import { config } from "../webpack.config.ts"; line so that we can share parts of the webpack config between storybook and our normal build. The problem we had was that changes to webpack.config.ts weren't cache busting.

Looking at

ctx.git.packageManifestChanges = changedFilesWithInfo.flatMap(
I see where package.json can contribute to a rebuild, but I don't see how the storybook or webpack config contributes. Perhaps I'm looking in the wrong part of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Classification: Something isn't working needs triage Tracking: Issue needs confirmation
Projects
None yet
Development

No branches or pull requests

2 participants