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

No webpack config for build-storybook --debug-webpack #15600

Closed
nettybun opened this issue Jul 15, 2021 · 5 comments
Closed

No webpack config for build-storybook --debug-webpack #15600

nettybun opened this issue Jul 15, 2021 · 5 comments

Comments

@nettybun
Copy link

nettybun commented Jul 15, 2021

Describe the bug

Hi I can't see any debug webpack output despite the option in the build-storybook --help section:

--debug-webpack     Display final webpack configurations for debugging purposes

It's never displayed and there's no txt log in the output directory either...

❯ npx build-storybook --debug-webpack
info @storybook/react v6.3.4
info 
info => Cleaning outputDir: /repo/storybook-static
info => Loading presets
info => Compiling preview..
info => Loading 1 config file in "/repo/.storybook"
info => Loading 9 other files in "/repo/.storybook"
info => Adding stories defined in "/repo/.storybook/main.js"
info => Using implicit CSS loaders
info => Using default Webpack4 setup
10% building 1/1 modules 0 active(node:41651) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.

See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
(Use `node --trace-deprecation ...` to show where the warning was created)
info => Preview built (16 s)
WARN asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
WARN This can impact web performance.
WARN Assets: 
WARN   vendors~main.9bba21ad.iframe.bundle.js (3.29 MiB)
WARN entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
WARN Entrypoints:
WARN   main (3.34 MiB)
WARN       runtime~main.d69e7d63.iframe.bundle.js
WARN       vendors~main.9bba21ad.iframe.bundle.js
WARN       main.36ab2da7.iframe.bundle.js
WARN 
info => Output directory: /repo/storybook-static**To Reproduce**


> npx sb@next repro

> cd reprodir

> npx build-storybook --help
Usage: build-storybook [options]

Options:
  -V, --version                     output the version number
  -s, --static-dir <dir-names>      Directory where to load static files from
  -o, --output-dir <dir-name>       Directory where to store built files
  -c, --config-dir <dir-name>       Directory where to load Storybook configurations from
  -w, --watch                       Enable watch mode
  --quiet                           Suppress verbose build output
  --loglevel <level>                Control level of logging during build
  --no-dll                          Do not use dll reference (no-op)
  --docs-dll                        Use Docs dll reference (legacy)
  --ui-dll                          Use UI dll reference (legacy)
  --debug-webpack                   Display final webpack configurations for debugging purposes
  --webpack-stats-json [directory]  Write Webpack Stats JSON to disk
  --preview-url <string>            Disables the default storybook preview and lets your use your own
  --force-build-preview             Build the preview iframe even if you are using --preview-url
  --docs                            Build a documentation-only site using addon-docs
  --modern                          Use modern browser modules
  -h, --help                        display help for command

> npx build-storybook --debug-webpack
info @storybook/react v6.4.0-alpha.17
info
info => Cleaning outputDir: /private/tmp/reprodir/storybook-static
info => Loading presets
info => Compiling preview..
info => Loading 1 config file in "/private/tmp/reprodir/.storybook"
info => Loading 9 other files in "/private/tmp/reprodir/.storybook"
info => Adding stories defined in "/private/tmp/reprodir/.storybook/main.js"
info => Using implicit CSS loaders
info => Using default Webpack4 setup
10% building 1/1 modules 0 active(node:42567) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.

See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
(Use `node --trace-deprecation ...` to show where the warning was created)
info => Preview built (13 s)
WARN asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
WARN This can impact web performance.
WARN Assets:
WARN   vendors~main.2e20dc6c.iframe.bundle.js (1.96 MiB)
WARN entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
WARN Entrypoints:
WARN   main (2 MiB)
WARN       runtime~main.cdb6c1c3.iframe.bundle.js
WARN       vendors~main.2e20dc6c.iframe.bundle.js
WARN       main.b83cef95.iframe.bundle.js
WARN
info => Output directory: /private/tmp/reprodir/storybook-static**System**
Environment Info:

  System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Binaries:
    Node: 16.3.0 - /usr/local/bin/node
    Yarn: 2.4.2 - /usr/local/bin/yarn
    npm: 7.15.1 - /usr/local/bin/npm
  Browsers:
    Firefox: 89.0
    Safari: 14.1.1
  npmPackages:
    @storybook/addon-actions: ^6.4.0-alpha.17 => 6.4.0-alpha.17
    @storybook/addon-docs: ^6.4.0-alpha.17 => 6.4.0-alpha.17
    @storybook/addon-essentials: ^6.4.0-alpha.17 => 6.4.0-alpha.17
    @storybook/addon-links: ^6.4.0-alpha.17 => 6.4.0-alpha.17
    @storybook/react: ^6.4.0-alpha.17 => 6.4.0-alpha.17

Additional context
Add any other context about the problem here.

It works for storybook --debug-webpack but that's not the webpack config I'm interested in. That's a dev-server development config but I want the production static build config...

Thank you!

@shilman
Copy link
Member

shilman commented Jul 16, 2021

Can confirm. Must be a regression in 6.x. Hopefully an easy fix!

@vishmimoney
Copy link
Contributor

Hi, I would like to start working on this as my first issue if it is available.
Thanks.

@shilman
Copy link
Member

shilman commented Jul 16, 2021

@vishmimoney Thank you for helping make Storybook better! 🙏 Please check out how to contribute in our docs and feel free to ask questions in #contributing in our Discord.

@shilman
Copy link
Member

shilman commented Jul 26, 2021

Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-alpha.21 containing PR #15674 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Jul 26, 2021
@shilman
Copy link
Member

shilman commented Jul 26, 2021

Olé!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.6 containing PR #15674 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants