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

Angular: Make enableProdMode optional #23489

Merged

Conversation

valentinpalkovic
Copy link
Contributor

Relates #23272
Addresses the following comment: #23404 (comment)

What I did

The enableProdMode is now configurable. It defaults in dev mode to false and in build mode to true. The defaults can be overwritten by the options, which are passed to the storybook and build-storybook executor in the angular.json

How to test

  • not necessary

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]

@valentinpalkovic valentinpalkovic marked this pull request as ready for review July 18, 2023 08:57
@valentinpalkovic valentinpalkovic self-assigned this Jul 18, 2023
@valentinpalkovic valentinpalkovic added bug angular ci:daily Run the CI jobs that normally run in the daily job. patch:no patch:yes Bugfix & documentation PR that need to be picked to main branch and removed patch:no labels Jul 18, 2023
@valentinpalkovic
Copy link
Contributor Author

cc @Tallyb

@Tallyb
Copy link

Tallyb commented Jul 18, 2023

Thanks!!!

@valentinpalkovic valentinpalkovic merged commit 10e38b5 into next Jul 19, 2023
109 of 121 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/make-enable-prod-mode-in-angular-optional branch July 19, 2023 07:41
storybook-bot pushed a commit that referenced this pull request Jul 19, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 19, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 19, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
@manbearwiz
Copy link
Contributor

Thanks, looking forward to this, was just hacking a way to disable prod in order to debug some issues I was having.

@Tallyb
Copy link

Tallyb commented Jul 19, 2023

FWIW - our context is that we use Playwright to test components on top of Storybook. We use the angular debug tool (window.ng) to evaluate some changes in the component. window.ng is only available in dev mode.

storybook-bot pushed a commit that referenced this pull request Jul 20, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 20, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 21, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 21, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 21, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 21, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 21, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 21, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 24, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
storybook-bot pushed a commit that referenced this pull request Jul 24, 2023
…mode-in-angular-optional

Angular: Make enableProdMode optional
(cherry picked from commit 10e38b5)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
angular bug ci:daily Run the CI jobs that normally run in the daily job. patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants