Angular-cli: Webpack

Created on 16 Dec 2015  路  32Comments  路  Source: angular/angular-cli

Hi all,
I've just tried this well done project.
The only problem that I see is that it use SystemJS. There's any chance to have webpack as well?

Most helpful comment

All 32 comments

+1 for webpack

+1 for webpack

+1 for webpack

+100000 for Webpack

+1 for webpack

no news about that? just to know if it planned or not :)

There aren't any plans for webpack right now, I believe. The build process is tightly tied into broccoli since that is what ember-cli uses.

Main priorities at the moment are getting the main user stories up and going, and only afterwards give some more thought to customizability.

That isn't to say you can't use webpack though! The scaffolding doesn't really care one way or another, neither do the tests. So basically you could very well use everything the cli has, minus ng serve.

Just add in your own webpack.config.js, npm dependencies, fire up webpack-dev-server and you're ready to go!

(I'm closing this for now, but feel free to keep the discussion flowing.)

I'm keen to to see the community acceptance of this project, without webpack scaffolding support ;)

@filipesilva thanks for the reply, but the point is why you/they decide to use SystemJs instead Webpack?

The CLI is mostly catering to the Typescript track at angular.io, which uses SystemJS. There is a section on the quickstart that touches on webpack:

There are alternatives that work just fine including the well-regarded webpack. SystemJS happens to be a good choice but we want to be clear that it was a choice and not a preference.

+1

+1

ember/ember-cli has its own philosophy and ecosystem. angular2 is totally different concept, angular-cli suppose to bring the smooth dev experience to angular2 not what ember-cli choose.

Just going to drop this here. https://github.com/angular/angular-cli/tree/webpack @TheLarkInn and a bunch of others have been working on the #webpack branch.

Oh, I've almost missed out that! +1 for webpack :)

Cool to see webpack coming into play. Is it known when (or which version) angular-cli will release webpack support?

I haven't seen the CLI team officially state a version or date yet; but I think for most practical purposes you can think of it as already being the "current" version: it seems like most people talking about CLI and staying up to date with it are already at webpack, and numerous old issues in this issue tracker have already been resolved because they pertain to the pre-webpack versions.

is webpack config somehow hidden from us? Why? How do I plug in autoprefixer for my styles or 3rd party dependencies?

@namek we wanted an opinionated and already managed base configuration. We realize there are other tools and features to be added so we will hopefully have an 'escape-hatch' or 'eject button' for the future.

So, @TheLarkInn, in that case is it possible to add a proxy url to the current version? The help files list
--proxy as an optional param for ng serve. But it doesn't seem like it's doing anything.

An escape hatch will be important I think - the power of webpack is its flexibility. Otherwise I'm afraid you'll be inundated with 'I can haz loader/plugin x?' requests.

Allow me to start :)

"I can haz cssnext?"

However I can't say enough how much of an improvement the webpack version is over the SystemJS one.

Actually just saw postcss in there. Ignore me.

To @SethDavenport's point, it would be ideal to be able to load a custom webpack config at the project root that the cli-webpack imports to extend its base config. This would allow anyone to haz whatever they wanted, without mucking up the base config or having to fork off the original cli (hello "eject").

I would seriously encourage anyone involved on this thread to come up with a design proposal for this. We have a half created one with me and @brocco but currently we are focusing on MVP items at the moment. This is still IMO a great deliverable.

Will take a look!

Design proposal pending, but a quick sketch of the code might look like this:

https://github.com/nikolasleblanc/angular-cli/commit/1e081a6649728ca4cc6dae30830d805bfd36750f

My design proposal. @TheLarkInn, not super familiar with the format of design proposals, open to suggestions if you have any.

https://github.com/angular/angular-cli/issues/1656

Does anybody know how to install angularfire2 after upgrade the angular-cli version to use the webpack bundler?

I am trying to follow the official repo steps to install angularfire2, but when I try to edit the 'angular-cli-build.js' file, I cannot find it.

Regards!

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

donaldallen picture donaldallen  路  3Comments

MateenKadwaikar picture MateenKadwaikar  路  3Comments

gotschmarcel picture gotschmarcel  路  3Comments

rwillmer picture rwillmer  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments