Skip to content

Commit

Permalink
You need the host & port for vite hmr websocket (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient authored Mar 10, 2023
1 parent 79a60bd commit 32459c6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,18 @@ Add start script to package.json
To make hot module replacement work, add the following to the config object in vite.config.js:
[source,javascript]
----
server: {
server: {
port: 5173,
host: '127.0.0.1',
hmr: {
port: 5173
port: 5173,
host: '127.0.0.1',
}
}
}
----

You do need the host and port in both places to ensure the websocket is constructed and upgraded properly.

[#spa-routing]
=== Single Page application routing

Expand Down

0 comments on commit 32459c6

Please sign in to comment.