mariusbalcytis / webpack-bundle

Bundle to Integrate Webpack into Symfony
MIT License
122 stars 36 forks source link

webpack:dev-server not emitting files on /compiled/ directory #55

Closed cpxPratik closed 7 years ago

cpxPratik commented 7 years ago

In my Symfony3 app, i use php built-in server with app running on localhost:8000 in dev environment(runs app_dev.php). js and css files gets emitted with updated code when running bin/console maba:webpack:compile and gets served from /localhost:8000/compiled/. If I run webpack:dev-server, it doesn't provide updated css,js files but files gets served from /localhost:8080/compiled/. In fact when i deleted /compiled/ directory, dev-server command doesn't create compiled folder and respective compiled files at all. So what is the problem? If i am missing something or doing something wrong please point me in right direction.

mariusbalcytis commented 7 years ago

That's how it's supposed to work. dev-server does not emit files to the disk, it compiles them on the fly and serves them itself - that's why URLs point to localhost:8080.

Why do you need those files to be emitted by dev-server?

cpxPratik commented 7 years ago

OK, I understood dev-server does in-memory compilation, but there is no changes in output even when i change js files. If i remove /compiled/ directory, No route found for "GET /compiled/*.bundle.js" is shown, that means localhost:8080 is not serving bundle files from memory.

cpxPratik commented 7 years ago

My apologies, issue was not related to webpack-bundle or webpack itself. I had 8080 port preoccupied by nginx server for another old app, that caused the problem. Thanks for reply.