storybook icon indicating copy to clipboard operation
storybook copied to clipboard

[Bug]: >= v8.2.0 Storybook versions no longer splits the sb-manager into chunks

Open ashleyyy94 opened this issue 6 months ago • 0 comments

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

  1. Initiate a new project using react-webpack5 as the framework.
  2. run npm run build-storybook
  3. Inside storybook-static/sb-manager, the js files are not split into chunks.
  4. 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

ashleyyy94 avatar Sep 03 '24 04:09 ashleyyy94