Closed ivan-kleshnin closed 9 years ago
Hehe, as I understand it that is required when you do not use the --hot
command line option? Or include a script in the index.html? Entry points are just pointing to scripts, like any require statement. It is just initial require statements really.
But does it work without it?
I've deciphered it :smiley_cat:
The only place it's explained is here
In short: you either add those entry line or pass --inline
flag to the webpack-dev-server
invocation in package.json
. The difference is that in the second case socketIO client code required to communicate with dev server is inlined in your main entry. Behavior will be the same.
Haha, fantastic! :-)
Link http://webpack.github.io/docs/webpack-dev-server.html contains this code
With this message
This is undocumented. You also use the same chunk in your own examples. But the funniest thing that official react-starter from webpack does not contain this. And they have both live and hot reload enabled...
Here is their entry (single place in code):
Did you manage to understand what's about this webpack/hot/dev-server line? What exactly is does? Why everyone uses it except Webpack itself :smiley: ?