Closed Grawl closed 2 years ago
Still broken on 2.7.3
Any plans on this?
With Vite, there is no problem. Should we convert our projects from Webpack to Vite?
Found a workaround: we have to remove one app.get()
from Webpack devServer Express router.
We can do that using devServer middleware from quasar.conf.js
:
devServer: {
// …devServer settings
onAfterSetupMiddleware: function (devServer) {
if (!devServer) throw new Error('webpack-dev-server is not defined')
const stack = devServer.app._router.stack
const re = /(\.hot-update\.json|\.js\.map)$/
const item = stack.find(({ regexp }) => regexp.toString() === re.toString())
stack.splice(stack.indexOf(item), 1)
},
},
Found this trick at https://stackoverflow.com/a/55053856/766307
Hi,
For Quasar v2, @quasar/app
is deprecated. Use @quasar/app-webpack
instead. Everything should work fine.
@rstoenescu I just updated reproduction repository and the problem is still existing https://github.com/Grawl/quasar-2-ssr-hmr
Just try to create a new project using yarn create quasar
, enable SSR mode and you will see that problem.
I now see exactly the use-case that you mean. The code that you removed was initially a workaround to a webpack-dev-server issue that now seems to be fixed.
Thanks for contributing! This will go into q/app-webpack 3.5.7
What happened?
After update to Quasar v2, HMR is not working for me.
What did you expect to happen?
HMR should work when SSR is enabled.
Reproduction URL
https://github.com/Grawl/quasar-2-ssr-hmr
How to reproduce?
git clone
,yarn
yarn dev-ssr
http://localhost:8080/
in browser and open browser dev tools consolesrc/pages/Index.vue
, style property for exampleGET http://localhost:8080/app.<hash>.hot-update.json 404 (Not Found)
for a millisecondFlavour
Quasar CLI (@quasar/cli | @quasar/app)
Areas
SSR Mode
Platforms/Browsers
Chrome
Quasar info output
Relevant log output
Additional context
No response