-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- now supports HMR - limitations - in node_modules/* modules are not supported HMR yet. - custom runtime module system by `swc-plugin-global-module` - https://github.com/leegeunhyeok/swc-plugin-global-module close #38
- Loading branch information
1 parent
e5e3048
commit a36f280
Showing
67 changed files
with
1,704 additions
and
399 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
Binary file added
BIN
+3.82 KB
.yarn/cache/@types-react-refresh-npm-0.14.3-d201a15407-ff48c18f92.zip
Binary file not shown.
Binary file added
BIN
+1.39 MB
.yarn/cache/swc-plugin-global-module-npm-0.1.0-alpha.5-cd339b699a-10523c5464.zip
Binary file not shown.
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
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 was deleted.
Oops, something went wrong.
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,30 @@ | ||
import { Callout } from 'nextra/components' | ||
|
||
# Hot Module Replacement | ||
|
||
<Callout type="warning"> | ||
HMR(Hot Module Replacement) is experimental. | ||
</Callout> | ||
|
||
esbuild doesn't currently support Hot Module Replacement(HMR). | ||
|
||
So, I working hard for implement custom HMR and it's partially available as an experimental feature. | ||
|
||
You can enable HMR by `experimental.hmr` set to `true` in your configuration file. | ||
|
||
```js | ||
/** | ||
* @type {import('@react-native-esbuild/core').Config} | ||
*/ | ||
exports.default = { | ||
// ... | ||
experimental: { | ||
hmr: true, | ||
}, | ||
}; | ||
``` | ||
|
||
and here are some limitations. | ||
|
||
- Detects changes in the `<projectRoot>/*` only. | ||
- Changes detected in `<projectRoot>/node_modules/*` will be ignored and fully refreshed after rebuild. |
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 |
---|---|---|
|
@@ -73,6 +73,9 @@ yarn-error.log | |
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# @swc | ||
.swc | ||
|
||
# @react-native-esbuild | ||
.rne | ||
.swc | ||
|
Binary file removed
BIN
-8.29 MB
...v7_macos_aarch64_0.104.4/90b69c1e7164e0dc62ebf083a345c7d5b7b0450c10b6dada84547644da60c783
Binary file not shown.
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 |
---|---|---|
|
@@ -29,4 +29,7 @@ exports.default = { | |
], | ||
}, | ||
}, | ||
experimental: { | ||
hmr: true, | ||
}, | ||
}; |
Oops, something went wrong.
a36f280
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Test suite run success
83 tests passing in 10 suites.
Report generated by 🧪jest coverage report action from a36f280