forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add react remapping to import resolver plugin (ampproject#37859)
* Add react remapping to import resolver plugin * Add comment * Simplify react/index exports * Add small change to trigger CI build * remap react to preact using babel when bundling for preact Co-authored-by: William H.G. Johnson <[email protected]>
- Loading branch information
1 parent
bc4ee11
commit 9acbd30
Showing
8 changed files
with
55 additions
and
17 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {hydrate, render} from '#preact'; | ||
|
||
export {hydrate, render}; | ||
|
||
export default {hydrate, render}; |
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,11 @@ | ||
import * as Preact from '#preact'; | ||
import * as PreactCompat from '#preact/compat'; | ||
|
||
export * from '#preact'; | ||
export * from '#preact/compat'; | ||
|
||
// This file allows us to remap react imports from external libraries to | ||
// our internal preact exports. This file uses a default export in order to | ||
// be compatible with libraries that use react default import syntax. | ||
|
||
export default {...Preact, ...PreactCompat}; |