Skip to content

Commit

Permalink
fix: set HMR host (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin committed Mar 16, 2024
1 parent b5b90ec commit e0823eb
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 84 deletions.
152 changes: 76 additions & 76 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ import react from "@vitejs/plugin-react"

const ASSET_URL = process.env.ASSET_URL || "/static/"
const VITE_PORT = process.env.VITE_PORT || "5173"
const VITE_HOST = process.env.VITE_HOST || "localhost"
export default defineConfig({
base: `${ASSET_URL}`,
clearScreen: false,
server: {
host: "0.0.0.0",
port: +`${VITE_PORT}`,
cors: true,
hmr: {
host: `${VITE_HOST}`,
},
},
plugins: [
react(),
Expand All @@ -33,11 +37,6 @@ export default defineConfig({
output: {
manualChunks(id) {
if (id.includes("node_modules")) {
// return id
// .toString()
// .split("node_modules/")[1]
// .split("/")[0]
// .toString()
return "vendor"
}
},
Expand Down

0 comments on commit e0823eb

Please sign in to comment.