Webpack update
We changed the build system between beta.10 and beta.14, from SystemJS to Webpack. And with it comes a lot of benefits. To take advantage of these, your app built with the old beta will need to migrate.
You can update your beta.10 projects to beta.14 by following these instructions.
Could someone elaborate on the benefits from switching from SystemJS to Webpack? The only benefit I can see so far is automatic detection and transpiling of .css and .scss files, which is cool.
P.S. What about JSPM?
There are a lot of behind the scenes features that webpack brings to the table out of the box, that SystemJS + SystemBundler did not.
It's really important to keep in mind the following:
webpack: module bundler (static build tool)
SystemJS: module loader (dynamic module loading in the run time)
SystemBundler: (the static build tool companion to SystemJS)
So the two aren't _really_ the same thing, and serve different purposes (maybe in the future we [the webpack core team] will chose to have a stronger interop story between the two])
The highest benefit I can think of as of personal opinion is that you don麓t have to keep track of what packages to add or remove in SystemJS, this is all done automatic because webpack uses the package.json information.
You also have a lot of control over the way your application will be built, but most of that customization is simplified with angular-cli.
because webpack uses the package.json information
No, it does not use package.json information. Webpack analyzes your JS code and searches for imports, then it bundles everything. Webpack 2 is also doing a tree shake, meaning it searches for classes and functions which are not used in your application in any way and removes them from bundle.
@Auxx : Thank you for clarify that, when I changed to Webpack in my App I was sure I read somewhere that it was like that, but either way Webpack takes the burden off from managing those packages on my App.
I see, that makes sense
I have read somewhere that angular-cli decided to change to Webpack because SystemJS is still very new in its infancy and therefore not reliable. Is this true?
Source:
https://www.reddit.com/r/Angular2/comments/4lbdys/webpack_vs_systemjs_pros_cons/
As someone who is working on an old pre-webpack project, one of the main advantages of webpack is that it makes installing 3rd party libraries a whole lot easier.
Seems the Angular team might end up with using Webpack 2 instead of broccoli as a lot of people in the community are in favour of it. They have already introduced a new module called compiler-cli for offline compilation. Think it does some tree shaking too but it isn't quite stable as of RC3.
Perhaps the main reason is that the community wants Webpack, so Angular2 delivers Webpack?
Source: https://www.reddit.com/r/Angular2/comments/4lbdys/webpack_vs_systemjs_pros_cons/
Most of the discussion around this topic is found on https://github.com/angular/angular-cli/issues/909.
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._
Most helpful comment
No, it does not use package.json information. Webpack analyzes your JS code and searches for imports, then it bundles everything. Webpack 2 is also doing a tree shake, meaning it searches for classes and functions which are not used in your application in any way and removes them from bundle.