react-webpack-generators / react-webpack-template

Simple react webpack template
MIT License
82 stars 44 forks source link

V2 -- Remove --open call on npm start #46

Open sthzg opened 8 years ago

sthzg commented 8 years ago

As brought up in generator-react-webpack #266

V2

@weblogixx should I tackle this?

weblogixx commented 8 years ago

Hi @sthzg, sure just go ahead.

sthzg commented 8 years ago

@weblogixx I've split this issue out in two:

46 => V1

47 => V2.

In the V2 version npm start directly invokes the webpack-dev-server cli, so there is no way that I know of to listen for the end of the (first) compilation to print a message to the console afterwards. Webpack however prints it by default on the very top (which after bundling is in the scrollback).

If this isn't good enough I don't see another way than bootstrapping the webpack-dev-server in a script file so that we can register a listener to when the first compilation is done (as a reference the implementation in the V1 branch).

weblogixx commented 8 years ago

Yes, there seems to be no way to do this with the command line currently :(. Have to think about that.

sthzg commented 8 years ago

Would there be something speaking against a devserver.js script in the root dir (like it has been in V3 with server.js)? After all, it seems to be just a small wrapper around the CLI, or am I missing something?

weblogixx commented 8 years ago

The only reason I removed it was that there is one file less and you can parse cli args into the launcher directly.