steveblue / angular2-rollup

CLI for bundling Angular with Rollup and Closure Compiler
121 stars 18 forks source link

Are nrwl/nx integration possible with angular2-rollup? #25

Open matthewharwood opened 5 years ago

matthewharwood commented 5 years ago

Do you have plans for integration with nrwl/nx on your roadmap? Nrwl def has a story for Angular/Bazel but it's in flux and there is no Closure. They also have angular-console which could be awesome if angular-rollup could fit in the plugin system they offer. This is asking a lot but would be really awesome to have ABC + nrwl/nx

steveblue commented 5 years ago

Integration with nrwl/nx is very welcome if it is possible. Do you want to help create the plugin @matthewharwood or investigate level of effort?

matthewharwood commented 5 years ago

I can investigate into nrwl! I think the first step is how does angular2-rollup become a ng add angular-rollup command.

If making ng add angular-rollup isn't possible. I think perhaps a better approach would be creating a buzz around ABC publicly. AngularCore need to see demand aka companies that want closure. From this we could get core (Alex Eagle) to create this for us. We both know that Closure can be huge gains(20%) in bundle size. It comes with a world of pain in debugging but in the end it makes the product far better!

steveblue commented 5 years ago

In 2.0.0 I purposefully made the ngr.config.js share the same schema as angular.json. I honestly wish I could have just extended the angular.json to provide another production build.

Debugging is not a world of pain if you are using the variable and property naming reports. These files will help you backtrace the property that is in error in the console to your source code. Granted they aren't as helpful as source maps, but these files still get the job done. Tooling would be helpful here of course and could possibly be created that reads the reports and generates hints for where the bug from mangling comes from.

steveblue commented 5 years ago

Whoops. Reopening because I mistakingly closed this issue.

steveblue commented 5 years ago

@matthewharwood The ROADMAP has changed after evaluating the latest Builders API, angular-rollup 3.0.0 will be an extension of Angular CLI. I was holding out for the Builders API to be stable. POC is here https://github.com/steveblue/architect

matthewharwood commented 5 years ago

Whoah! I read your post on medium! bravo brother! You should try to get this in a good place and show it to nrwl... they are all about "enterprise" yeah?

kalpesh-b commented 5 years ago

@matthewharwood @steveblue can you please give the link to that medium post?

steveblue commented 5 years ago

https://dev.to/steveblue/build-angular-like-an-architect-part-1-3ph2 @kalpesh-b