Closed xrkolovos closed 7 years ago
I see that angular.io has a section for using Webpack with angular. But I am unclear as to how to replace systemjs with the new framework.
Assuming the the Angular CLI-move is relevant (which I suppose it is), then it's critical to move this too, because this is usually step 1 for all beginners
I is much easier to learn Angular if authors would use Webpack. Using SystemJS for tutorials creates confusion and steepens the learning curve. This app needs to be refactored and updated.
Thanks for the feedback.
Just to be clear ... this repo is purely for me playing around, all the official ToH code is in the angular docs.
RE: webpack vs systemjs ... I'm not siding with any specific tool. THere are various build tools ... various module loaders .... various CI tools. SystemJS has much less overhead to just jump and run ... a webpack config is very powerful (which is why we used it in the CLI). Tools change ... people want options.
So while I agree that WebPack is likely how I will proceed for Angular, too (thus refer to the CLI work I am doing) ... Having options with other tools is a good thing.
BTW - I expect the ToH will be re-done in the CLI and webpack at some point. Either way, the concepts will remain.
I thought all your work was for us newbies :-) I'm most interested in the search functionality and trying to figure that out. I'll go back to ToH for that. A lot of newbies are struggling with the tutorials and code online that is outdated relative to the cli and Angular after 9/15/16. This is bar far the most difficult framework I've ever tried to learn! Thanks for all your help!!!!
Ha ... well, I never got ri of this repo because I still use it for testing some new features. I will update it ... once I get the CLI course out the door that I am working on.
The CLI was in massive flux for a long time ... so all of the webpack goodness you see today is awesome in the CLI, but it would have been painful to use even as recently as a few months (or weeks) ago.
I love the CLI .. great improvements
RE: Angular being difficult ... In my experience the people I teach do not have issues with Angular, they have difficulty with the stuff around it like you mentioned. WebPack/SystemJS/Node/NPM/Gulp/module loaders/ESM/TypeScript versions/etc
Things they need before they can even start Angular :)
That's why the CLI is so awesome ... it removes all of that.
So for a new projects is advisable to use CLI?
I can't imagine new projects without CLI
Move angular2 project from systemjs to CLI webpack, replace app/ folder from systemjs project in CLI project, put the templates path relatives to its component, update package.json, npm update, and ng serve
done
Maybe it will be useful for someone so I've shared my findings while migration in the post here https://alfilatov.com/posts/how-to-migrate-your-spa-from-jspm-systemsjs-to-webpack/
I think everyone now is moving to webpack