angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Why migrate from Broccoli to Webpack? What about SystemJS?

Open richmwatts opened this issue 10 years ago • 6 comments

As title.

Sorry to raise an issue but its a burning question.

Implicitly related:

Does any one have any good sources of information regarding the recommended build tool/process that Angular 2 applications should currently be developed using. Or at least, the path of least resistance.

Thanks

richmwatts avatar Aug 10 '16 16:08 richmwatts

Webpack 2 > Brocolli. It's simpler and less boilerplate.

ghost avatar Aug 11 '16 04:08 ghost

Webpack has more than 200 bug, what about gulp+jspm

tieppt avatar Aug 11 '16 04:08 tieppt

The default one is webpack, you can still use systemjs. angular-cli@systemjs

ghost avatar Aug 11 '16 05:08 ghost

I think my question/proposal and comments related shed some decent light onto maybe why. But if you have further questions I can answer them as well. https://github.com/angular/angular-cli/issues/909

TheLarkInn avatar Aug 18 '16 02:08 TheLarkInn

Overall, SystemJS is a better module loader than Webpack, while Webpack is a better bundler.

In the Broccoli version we were using SystemJS as the module loader. There were a couple of big issues that kept coming up again and again:

  • SystemJS configuration for 3rd party libs quickly became non-trivial, especially for dependencies of dependencies.
  • Unbundled builds were serving A LOT (600+) of files. As a project grew, refreshes started taking several seconds.

So we opted to move to webpack since it bundles by default and most 3rd party libs 'just work' there. We could have picked other tools, but these were the ones we picked because they solved the pressing problems we had.

As far as user experience is concerned, our vision is The CLI is the build tool. The interface between your app and the CLI matters, not what it's using inside.

We understand that this approach doesn't suit all users. If you want to have full control and costumization over your build setup, maybe the CLI is not for you and that's ok. There are plenty of A2 seed repos for every imaginable combo of technologies, lovingly made by the community, that you can use instead.

In regards to the path of least resistance, I'd say https://angular.io/ and https://github.com/angular/quickstart. The official docs are kept up to date with each release to make sure all the examples work, and they are all based on the quickstart. I don't think there's any other resource nearly as up to date.

filipesilva avatar Aug 18 '16 03:08 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.