Skip to content

Conversation

@UberMouse
Copy link
Contributor

Summary

  1. updates the heft-storybook-plugin to be compatible with storybook v9, this only required adapting to the bin change from an object pointing at different files depending on whether doing a watch/package build, to a single binary file for both
  2. updates the storybook build samples to storybook v9, I mostly did this to try and reproduce an issue at our work rush monorepo around storybook and watch mode, which turned out to be related to the heft-rspack-plugin instead
  3. added support for detecting the --serve flag when using the heft-rspack-plugin via the same method as the webpack plugins

Details

3 is not done correctly, when adding a dependency on the heft-rspack-plugin to import the same types as the heft-webpack plugins I started getting the following typescript errors

ncountered 3 errors
 [build:typescript] /home/taylorl/code/rushstack/common/temp/default/node_modules/.pnpm/@rspack+core@1.6.0-beta.0/node_modules/@rspack/core/dist/builtin-plugin/css-extract/index.d.ts:9:34 - (TS2304) Cannot find name 'HTMLLinkElement'.
 [build:typescript] /home/taylorl/code/rushstack/common/temp/default/node_modules/.pnpm/webpack-dev-server@5.2.2_webpack@5.98.0/node_modules/webpack-dev-server/types/lib/Server.d.ts:1810:5 - (TS2717) Subsequent property declarations must have the same type.  Property 'devServer' must be of type 'DevServerConfiguration | undefined', but here has type 'DevServerConfiguration | undefined'.
 [build:typescript] /home/taylorl/code/rushstack/heft-plugins/heft-rspack-plugin/dist/heft-rspack-plugin.d.ts:13:10 - (TS2614) Module '"@rspack/core"' has no exported member 'rspackCore'. Did you mean to use 'import rspackCore from "@rspack/core"' instead?

I'm not really sure what is going on there, so I opted to just drop the dependency and work around the missing types. This was enough to generate a patch for our internal Rush monorepo which is what I am after.

How it was tested

Built the storybook sample project

Impacted documentation

I don't think so?

@github-project-automation github-project-automation bot moved this to Needs triage in Bug Triage Dec 9, 2025
@UberMouse UberMouse force-pushed the storybook-v9-support branch from a451802 to 14cc4e5 Compare December 9, 2025 02:00
@UberMouse UberMouse changed the title [heft] update storybook to be compatible with v9 [heft] update storybook plugin to be compatible with v9 Dec 9, 2025
Also adds support for serve mode detection when using the heft-rspack-plugin
@UberMouse UberMouse force-pushed the storybook-v9-support branch from 14cc4e5 to 5dbc106 Compare December 9, 2025 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant