-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turbopack: Implement HMR for module-scoped environment variable chang…
…es (#68209) While we currently refetch RSC updates on changes to the environment (e.g. `.env` files), we never cleared the require cache to re-evaluate RSCs with the new environment. This implements that. Test Plan: Added tests. `TURBOPACK=1 pnpm test-dev test/development/app-hmr/hmr.test.ts`
- Loading branch information
1 parent
c66f7ed
commit 2c8736a
Showing
4 changed files
with
94 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const MY_DEVICE = process.env.MY_DEVICE?.slice() | ||
|
||
export default function Page() { | ||
return <p>{MY_DEVICE}</p> | ||
} | ||
|
||
export const runtime = 'edge' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const MY_DEVICE = process.env.MY_DEVICE?.slice() | ||
|
||
export default function Page() { | ||
return <p>{MY_DEVICE}</p> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters