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): add support for a custom builder #4903

Merged
merged 1 commit into from May 11, 2021

Conversation

Jordan-Hall
Copy link
Contributor

Ability to support incremental builds when using custom builders

Current Behavior

Currently @nrwl/angular:webpack-browser only supports angular builder @angular-devkit/build-angular. However, this prevents people to use incremental builder when using common builder such as @angular-builders/custom-webpack

Expected Behavior

Ability to use customBuilder to overwrite the default angular builder while still support incremental builds

Related decussion

#4896

@Jordan-Hall Jordan-Hall force-pushed the angular-custom-bulder-support branch 2 times, most recently from b0e95ab to a852a0e Compare February 26, 2021 02:26
@Jordan-Hall Jordan-Hall marked this pull request as ready for review February 26, 2021 02:38
@Jordan-Hall
Copy link
Contributor Author

Jordan-Hall commented Feb 28, 2021

I think I figured out a better way of doing this. @vsavkin may be looking at the angular one at least. It's just a wrapper around the angular builder. Maybe add a setting. nx.json which would automatically wrap around any build inside workspace.json or angular.json (that's not part of nrwl builders). That way its not as opinionated but you can enable incremental builds.

@juristr
Copy link
Member

juristr commented Mar 12, 2021

@Jordan-Hall thx, I'm going to have a look

@Jordan-Hall
Copy link
Contributor Author

Jordan-Hall commented Mar 12, 2021

No problem. Happy to produce a prototype on using the nx.json and ensuring any builder can be wrapped by a setting, rather than on builders itself.

@juristr juristr added the scope: angular Issues related to Angular support in Nx label May 7, 2021
@Coly010 Coly010 self-requested a review May 7, 2021 13:22
Copy link
Contributor

@Coly010 Coly010 left a comment

Choose a reason for hiding this comment

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

This looks great! 🔥

I've requested a change to the naming of the property to allow it represent the property more accurately.

As another point, however, how does this work with configurations?

Have you tested whether the third party builder receives the configuration object correctly?

For example, an nx build --prod should then pass the production configuration object right down to the third party builder.

packages/angular/src/builders/webpack-browser/schema.json Outdated Show resolved Hide resolved
@juristr juristr assigned Coly010 and unassigned juristr May 7, 2021
@juristr juristr removed their request for review May 7, 2021 14:38
@Jordan-Hall
Copy link
Contributor Author

This looks great! 🔥

I've requested a change to the naming of the property to allow it represent the property more accurately.

As another point, however, how does this work with configurations?

Have you tested whether the third party builder receives the configuration object correctly?

For example, an nx build --prod should then pass the production configuration object right down to the third party builder.

I'll make the change later today. Yes I've tested this and didn't have any issues.

@Jordan-Hall Jordan-Hall force-pushed the angular-custom-bulder-support branch from ffafffd to a255372 Compare May 8, 2021 18:34
@vercel
Copy link

vercel bot commented May 8, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/madebCXeSHvEHJzNZw9pVYxEeiaX
✅ Preview: Canceled

[Deployment for 6b8ac39 canceled]

Ability to support incremental builds when using target builders

ISSUES CLOSED: nrwl#4896
Copy link
Contributor

@Coly010 Coly010 left a comment

Choose a reason for hiding this comment

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

Thank you! This looks great!

LGTM

@Coly010 Coly010 merged commit a78fe65 into nrwl:master May 11, 2021
Coly010 added a commit to Coly010/nx that referenced this pull request May 17, 2021
Coly010 added a commit that referenced this pull request May 18, 2021
* Revert "feat(angular): add support for a target Builder (#4903)"

This reverts commit a78fe65.

* chore(angular): disable failing test
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: angular Issues related to Angular support in Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants