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

[Bug]: Angular always devMode enabled when using build-storybook #23272

Closed
ssams opened this issue Jul 3, 2023 · 0 comments · Fixed by #23404
Closed

[Bug]: Angular always devMode enabled when using build-storybook #23272

ssams opened this issue Jul 3, 2023 · 0 comments · Fixed by #23404

Comments

@ssams
Copy link
Contributor

ssams commented Jul 3, 2023

Describe the bug

Follow-Up for #16211 as requested in #16211 (comment), as it still applies in SB 7.

When using the angular.json "@storybook/angular:build-storybook" builder, prod mode is not used like I would expect.

To Reproduce

Reproducible with unmodified sandbox project.

  1. npx storybook@next sandbox angular-cli/default-ts
  2. sandbox created with defaults, switch to the new project and run yarn install
  3. yarn build-storybook
  4. Open the project in a browser.
  5. Navigate to the stories of an Angular component.
  6. Check the browser console output.

Browser console logs an information that it's running in development mode: "Angular is running in development mode. Call enableProdMode() to enable production mode."

System

Environment Info:

  System:
    OS: Linux 6.3 Fedora Linux 38 (Workstation Edition)
    CPU: (16) x64 AMD Ryzen 7 5700G with Radeon Graphics
  Binaries:
    Node: 18.16.0 - /usr/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.5.1 - /usr/bin/npm
  Browsers:
    Chrome: 114.0.5735.133
  npmPackages:
    @storybook/addon-docs: ^7.1.0-alpha.42 => 7.1.0-alpha.42 
    @storybook/addon-essentials: ^7.1.0-alpha.42 => 7.1.0-alpha.42 
    @storybook/addon-interactions: ^7.1.0-alpha.42 => 7.1.0-alpha.42 
    @storybook/addon-links: ^7.1.0-alpha.42 => 7.1.0-alpha.42 
    @storybook/angular: ^7.1.0-alpha.42 => 7.1.0-alpha.42 
    @storybook/blocks: ^7.1.0-alpha.42 => 7.1.0-alpha.42 
    @storybook/testing-library: ^0.2.0 => 0.2.0

Additional context

Workaround from #16211 (comment) still works.

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

Successfully merging a pull request may close this issue.

2 participants