Webpack proxy not working in Quasar V2
See original GitHub issueI have just updated to the latest v2 beta:
"@quasar/extras": "^1.10.2" -> "@quasar/extras": "^1.10.5",
"quasar": "^2.0.0-beta.12" -> "quasar": "^2.0.0-beta.19",
"@quasar/app": "^3.0.0-beta.15", -> "@quasar/app": "^3.0.0-beta.28",
On both versions I have the following config in my quasar.conf.js
devServer: {
https: false,
host: '0.0.0.0',
public: '0.0.0.0:8081',
port: 8081,
open: true // opens browser window automatically
},
I then start Quasar with the command quasar dev -p 8082
.
It is used because my development environment has NGINX in front of it and routes all traffic to the Quasar Dev instance through port 8081, proxying to port 8082. By having the public variable set, I have been able to allow my development environment to communicate for hot reload through this proxy.
Since the update though, it doesn’t appear to be recognising the proxy. Even with the public proxy variable set, I get the error in the console:
Firefox can’t establish a connection to the server at ws://localhost:8082/ws.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
API Proxying for Dev - Quasar Framework
To achieve this, we can run the dev server and the API backend side-by-side (or remotely), and let the dev server proxy all...
Read more >devServer proxy doesn't work | Quasar Framework Community
I'm trying to use devServer.proxy option like this: devServer: { https: ... How could i fix it? ... @qyloxe Is this webpack functionality?...
Read more >Quasar and webpack devServer ECONNREFUSED on docker ...
In your Quasar configuration, you need to change the host property to be the special 0.0. 0.0 "everywhere" address: devServer: { host: '0.0....
Read more >Quasar and Vite - Frontend Application Development at Light ...
But, this advantage is especially noticeable, once your project gets even remotely bigger. Initial Loading of a new Quasar project with Webpack.
Read more >Watch and WatchOptions | webpack
Verify that webpack is not being notified of changes by running webpack with the --progress flag. If progress shows on save but no...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see that Quasar webpack-dev-server has been bumped to version v4. I installed the latest version, followed the webpack-dev-server migration guide (https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md) and now the issue is resolved. Thanks.
Webpack has been upgraded from v4 to v5 in
@quasar/app v3.0.0-beta.16
, which also meanswebpack-dev-server
is upgraded to match the next major Webpack version. Please see the upgrade guide. So, that is why you experienced some changes.I am not sure if anything is consciously changed about this, or this is a bug. But the
public
option got replaced bywebSocketURL
, but it’s not released yet. And it looks like the new usage is now like this(according to https://github.com/webpack/webpack-dev-server/pull/3309/files#diff-3f93c6a4c6fa5ed06e1d75bb4e0661b277bbe5b06c0df8828684ce405b10fa9c):So, ideally, you would file a ticket to them, but since they removed this option that would be useless. I guess we need to wait until they release a new version with these changes and test if it’s working or not, then move accordingly.
So, from our side, when the Webpack team releases this change and updates their documentation, we would just need to bump the package and document this change in our docs as the
public
option is currently documented in our dev server docs.For reference: https://github.com/webpack/webpack-dev-server/pull/3181 https://github.com/webpack/webpack-dev-server/pull/3350 https://github.com/webpack/webpack-dev-server/pull/3309