quasar icon indicating copy to clipboard operation
quasar copied to clipboard

Bump webpack dev server to version 3.4 or above to support sockPort option

Open tsewaiho opened this issue 7 years ago • 1 comments

I use Quasar as frontend and Laravel as backend. When I am developing, I serve Laravel at 0.0.0.0:8000 and Quasar at 0.0.0.0:8080.

In the laravel view, it links to the compiled Quasar app by

<div id="q-app"></div>
<script src="http://192.168.1.3:8080/app.js"></script>

To make this approach work, I have to add sockPort:8080 in webpack dev server's option. So that the hot reload and async import know that it should use 192.168.1.3:8080 instead of 192.168.1.3:8000.

May be this page will explain better https://github.com/webpack/webpack-dev-server/pull/1792

This option is added from v3.4.0 https://github.com/webpack/webpack-dev-server/releases

tsewaiho avatar Jun 04 '19 00:06 tsewaiho

Sorry. I am going to close this issue. I find that there is one more problem that prevent this approach to work, Lazy loading. sockPort still can not make the bundle to request async components from correct port. I have to continue to use dev server proxy to develop with Laravel.

tsewaiho avatar Jun 04 '19 08:06 tsewaiho