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

feat(angular): disable ngcc when not needed #19307

Merged
merged 4 commits into from
Oct 4, 2022

Conversation

bovandersteene
Copy link
Contributor

@bovandersteene bovandersteene commented Sep 30, 2022

Issue:

What I did

If you run postInstall ngcc, you don't have to run it every time you start a storybook instance.
If you have a monorepo project with a lot of storybook settings and tests, this can cause lockouts and a message like this: “Another process, with id 5197, is currently running ngcc.”
We're adding an optional parameter to the angular configuration to disable ngcc. Ngcc is enabled by default

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@antoinepairet
Copy link

This thread also discusses why ngcc is run synchronously by Storybook: https://github.com/storybookjs/storybook/pull/11157/files#r591235103

Copy link
Member

@kroeder kroeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This totally makes sense

I left some comments 🙂

code/frameworks/angular/src/types.ts Outdated Show resolved Hide resolved
@ndelangen ndelangen merged commit 448f5f4 into storybookjs:next Oct 4, 2022
@antoinepairet
Copy link

@ndelangen and @kroeder: Contributing to Storybook is such a great experience 💯 . Thank you for the quick follow-up 🙌🏻 . We will definitely do that again if we have the opportunity 😍

@DanielRose
Copy link

Would it be possible to patch this into storybook v6, since vNext is not yet released?

@ndelangen
Copy link
Member

@DanielRose I recommend trying the beta release 👍

@DanielRose
Copy link

@ndelangen I'm sorry, but I'm not going to deploy a beta release on a production system.

@esther44
Copy link

Hi @DanielRose ,
I still get the ngcc error with beta version
image
image
I reproduce with compose:storybook, I use refs with url of my others storybook
image
image

Maybe another idea ?

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

Successfully merging this pull request may close these issues.

6 participants