Skip to content

Commit

Permalink
chore: shake out HMR code from production build
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-ebey committed Jul 20, 2023
1 parent 24032ee commit 963596a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/shake-it-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

shake out HMR code from production build
5 changes: 5 additions & 0 deletions packages/remix-dev/compiler/js/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ const createEsbuildConfig = (
"process.env.REMIX_DEV_SERVER_WS_PORT": JSON.stringify(
ctx.config.devServerPort
),
...(ctx.options.mode === "production"
? {
"import.meta.hot": "undefined",
}
: {}),
},
jsx: "automatic",
jsxDev: ctx.options.mode !== "production",
Expand Down

0 comments on commit 963596a

Please sign in to comment.