-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can't bundle navigation react and support 'use client'. Bundling puts all components into a single file but 'use client' needs to be applied at the file level. So switched the package task of navigation react to transpile using typescript instead of bundle using rollup. Kept rollup for all other libraries and tasks. Without bundling typescript puts some helper stuff at the top of each file - it used appear just once when it was one big file. To keep this to a minimum removed 'import * as React from 'react';' - this isn't needed anymore because react/typescript adds 'react/jsx-runtime'. Removing this removes the importStar typescript helper stuff. Don't want to 'importHelpers' because then dependent on tslib and don't want any 3rd party dependencies. This stopped the build task from working because it didn't recognise 'react/jsx-runtime'. So added it as an external but there is no umd build for it so the index.html sample won't work anymore. But noticed that [react doesn't support umd builds anymore](facebook/react#28735 (comment)) anyway so will either ditch the build task and index.html sample or switch to esm?! will investigate later. Haven't tried the unbundled navigation react package but the files are generated at least
- Loading branch information
1 parent
75c867d
commit c78c297
Showing
17 changed files
with
219 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
build/dist | ||
build/npm/**/navigation*.js | ||
build/npm/**/*.js | ||
build/npm/**/android | ||
build/npm/**/ios | ||
build/npm/**/cpp | ||
|
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,4 +1,4 @@ | ||
import { createContext } from 'react'; | ||
import { StateNavigator } from 'navigation'; | ||
import * as React from 'react'; | ||
|
||
export default React.createContext({ oldState: null, state: null, data: {}, stateNavigator: new StateNavigator() }); | ||
export default createContext({ oldState: null, state: null, data: {}, stateNavigator: new StateNavigator() }); |
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,10 @@ | ||
import AsyncStateNavigator from './AsyncStateNavigator'; | ||
import NavigationContext from './NavigationContext.server'; | ||
import NavigationHandler from './NavigationHandler'; | ||
import NavigationBackLink from './NavigationBackLink'; | ||
import NavigationLink from './NavigationLink'; | ||
import RefreshLink from './RefreshLink'; | ||
import FluentLink from './FluentLink'; | ||
import SceneView from './SceneView.server'; | ||
|
||
export { AsyncStateNavigator, NavigationContext, NavigationHandler, NavigationBackLink, NavigationLink, RefreshLink, FluentLink, SceneView }; |
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,4 +1,3 @@ | ||
|
||
const SceneRSCView = ({children}) => children; | ||
|
||
export default SceneRSCView; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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