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
@iclanton iclanton moved this from Needs triage to In Progress in Bug Triage Dec 17, 2025
@UberMouse
Copy link
Contributor Author

hrm storybook v9 requires node v20+ so the node 18 CI matrix fails

@iclanton
Copy link
Member

@UberMouse - Node 18 entered EOL in April, so it may be okay to remove. @octogonz - will dropping Node 18 break your stuff?

@octogonz
Copy link
Collaborator

@UberMouse - Node 18 entered EOL in April, so it may be okay to remove. @octogonz - will dropping Node 18 break your stuff?

Yes, we still have some Rush repos that need to build with Node 18. :'(

@iclanton iclanton force-pushed the storybook-v9-support branch from a027720 to 15cecc1 Compare December 27, 2025 23:48
@iclanton iclanton force-pushed the storybook-v9-support branch from 15cecc1 to 87d8712 Compare December 28, 2025 02:08
@iclanton iclanton enabled auto-merge (squash) December 28, 2025 02:10
@iclanton iclanton merged commit fda17e9 into microsoft:main Dec 28, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Closed in Bug Triage Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants