Skip to content

Commit

Permalink
refactor!(dev,react): remove deprecated REMIX_DEV_SERVER_WS_PORT env var
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Jul 26, 2023
1 parent 7917c81 commit 73745d9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .changeset/moody-pants-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@remix-run/dev": major
"@remix-run/react": major
---

remove deprecated REMIX_DEV_SERVER_WS_PORT env var

use `remix dev`'s '`--port`/`port` option instead
4 changes: 0 additions & 4 deletions packages/remix-dev/compiler/js/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ const createEsbuildConfig = (
"process.env.REMIX_DEV_ORIGIN": JSON.stringify(
ctx.options.REMIX_DEV_ORIGIN ?? ""
),
// TODO: remove in v2
"process.env.REMIX_DEV_SERVER_WS_PORT": JSON.stringify(
ctx.config.devServerPort
),
...(ctx.options.mode === "production"
? {
"import.meta.hot": "undefined",
Expand Down
4 changes: 0 additions & 4 deletions packages/remix-dev/compiler/server/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ const createEsbuildConfig = (
publicPath: ctx.config.publicPath,
define: {
"process.env.NODE_ENV": JSON.stringify(ctx.options.mode),
// TODO: remove in v2
"process.env.REMIX_DEV_SERVER_WS_PORT": JSON.stringify(
ctx.config.devServerPort
),
"process.env.REMIX_DEV_ORIGIN": JSON.stringify(
ctx.options.REMIX_DEV_ORIGIN ?? ""
),
Expand Down
4 changes: 0 additions & 4 deletions packages/remix-react/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1308,10 +1308,6 @@ export const LiveReload =
url.port =
${port} ||
REMIX_DEV_ORIGIN ? new URL(REMIX_DEV_ORIGIN).port :
Number(${
// TODO: remove in v2
process.env.REMIX_DEV_SERVER_WS_PORT
}) ||
8002;
let ws = new WebSocket(url.href);
Expand Down

0 comments on commit 73745d9

Please sign in to comment.