storybook
storybook copied to clipboard
[Bug]: >= v8.2.0 Storybook versions no longer splits the sb-manager into chunks
Describe the bug
After upgrading from 8.1.11 to 8.2 onwards, I noticed that sb-manager files no longer gets split into chunks by webpackFinal's configurations:
config.optimization = { ...config.optimization, splitChunks: { chunks: 'all', maxInitialRequests: Infinity, minSize: 30 * 1024, maxSize: 500 * 1024, }, };
Reproduction link
https://stackblitz.com/edit/github-xmmg5f?file=.storybook%2Fmain.ts
Reproduction steps
- Initiate a new project using react-webpack5 as the framework.
- run
npm run build-storybook
- Inside storybook-static/sb-manager, the js files are not split into chunks.
- Expected to be split as of 8.1.11
System
Storybook Environment Info:
System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Pro
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm <----- active
Browsers:
Chrome: 128.0.6613.114
Safari: 17.6
npmPackages:
@storybook/addon-essentials: ^8.2.9 => 8.2.9
@storybook/addon-interactions: ^8.2.9 => 8.2.9
@storybook/addon-links: ^8.2.9 => 8.2.9
@storybook/addon-styling-webpack: ^1.0.0 => 1.0.0
@storybook/addon-themes: ^8.2.9 => 8.2.9
@storybook/addon-webpack5-compiler-swc: ^1.0.5 => 1.0.5
@storybook/blocks: ^8.2.9 => 8.2.9
@storybook/react: ^8.2.9 => 8.2.9
@storybook/react-webpack5: ^8.2.9 => 8.2.9
@storybook/test: ^8.2.9 => 8.2.9
storybook: ^8.2.9 => 8.2.9
Additional context
No response