Nuxt.js: Hot Module Replacement not working in modern mode (Error 404)

Created on 23 Dec 2018  路  2Comments  路  Source: nuxt/nuxt.js

Version

v2.3.0

Reproduction link

https://codesandbox.io/s/ly824lz46l

Steps to reproduce

  1. Add modern: "client" to nuxt.config.js.
  2. Start nuxt in dev mode.
  3. Edit a file (e.g. pages/index.vue - the browser won't update automatically. Additionally, you will be able to see at least one request to https://ly824lz46l.sse.codesandbox.io/__webpack_hmr/modern failing with status code 404
  4. Remove modern: "client" from nuxt.config.js.
  5. Hot module replacement works again.

What is expected ?

HMR working with modern: "client"

What is actually happening?

Request to .../__webpack_hmr/modern failing with code 404

Additional comments?

I used the default nuxt template from code sandbox and added modern: "client" to nuxt.config.js.

This bug report is available on Nuxt community (#c8350)
bug-report

All 2 comments

fyi - you can run modern only for production with something like this

  modern: process.env.NODE_ENV === 'production',

Will work on it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bimohxh picture bimohxh  路  3Comments

surmon-china picture surmon-china  路  3Comments

jaredreich picture jaredreich  路  3Comments

uptownhr picture uptownhr  路  3Comments

vadimsg picture vadimsg  路  3Comments