-
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
ced78aa
commit 6fc2d8d
Showing
137 changed files
with
2,524 additions
and
1,783 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
+10.6 KB
.yarn/cache/esbuild-dependency-graph-npm-0.2.1-00e55c5a7d-b2de0328dd.zip
Binary file not shown.
Binary file added
BIN
+7.56 KB
.yarn/cache/esbuild-plugin-module-id-npm-0.1.3-fd4d7e8747-7ae6493884.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 | ||
|
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, | ||
}, | ||
}; |
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 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { Logger } from '@react-native-esbuild/utils'; | ||
import { Logger } from '@react-native-esbuild/shared'; | ||
|
||
export const logger = new Logger('cli'); |
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
Oops, something went wrong.
6fc2d8d
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
56 tests passing in 7 suites.
Report generated by 🧪jest coverage report action from 6fc2d8d