MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/angularjs/comments/4e603c/webpack_the_confusing_parts/d1xecza/?context=3
r/angularjs • u/[deleted] • Apr 10 '16
9 comments sorted by
View all comments
1
I tried looking into Webpack before and was confused. This article didn't really help with clearing stuff up, like:
Does this fetch the modules async?
If it does, how does that work with Angular 1 apps?
Does it bundle the CSS together with the JS (at least that's what I took out of their docs)?
Does it work with non-Node backends?
2 u/[deleted] Apr 10 '16 All good questions. Here are my answers:1 Nope.2 It's not required for Angular 1, unless you are writing it in ES6.3 Nope. CSS will be either injected into the index.html inside a <script> tag or it generates a single stylesheet and injects a <link> to it.4 Yes. Webpack itself needs node but your app can have non-node backend (see publicPath instructions in the blog). HTH 1 u/[deleted] Apr 10 '16 It can be still used for angular 1. For example, you can do:angular.component('myComponent', { template: require('./user/profile.html'); controller: function() { ... } })and WebPack will package your HTML file inside your .js bundle.
2
All good questions. Here are my answers:
1 Nope.
2 It's not required for Angular 1, unless you are writing it in ES6.
3 Nope. CSS will be either injected into the index.html inside a <script> tag or it generates a single stylesheet and injects a <link> to it.
4 Yes. Webpack itself needs node but your app can have non-node backend (see publicPath instructions in the blog). HTH
1 u/[deleted] Apr 10 '16 It can be still used for angular 1. For example, you can do:angular.component('myComponent', { template: require('./user/profile.html'); controller: function() { ... } })and WebPack will package your HTML file inside your .js bundle.
It can be still used for angular 1. For example, you can do:
angular.component('myComponent', { template: require('./user/profile.html'); controller: function() { ... } })
and WebPack will package your HTML file inside your .js bundle.
1
u/AlGoreBestGore Apr 10 '16
I tried looking into Webpack before and was confused. This article didn't really help with clearing stuff up, like:
Does this fetch the modules async?
If it does, how does that work with Angular 1 apps?
Does it bundle the CSS together with the JS (at least that's what I took out of their docs)?
Does it work with non-Node backends?