Skip to content

Commit

Permalink
Externalize 'react-native-webview' & fix event listener bug in 'Paylo…
Browse files Browse the repository at this point in the history
…adTransport'
  • Loading branch information
smithki committed Apr 15, 2020
1 parent c62a6a6 commit 520e510
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/payload-transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class PayloadTransport {
* relevant iframe context.
*/
constructor(private readonly endpoint: string, private readonly encodedQueryParams: string) {
this.initMessageListener();
if (!IS_REACT_NATIVE) this.initMessageListener();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function configBase(name: 'cjs' | 'cdn' | 'react-native') {
if (isReactNative) {
// In React Native environments, we expect the developer to provide their
// own React dependencies, so we mark them as "externals".
config.externals(/^(react|react-native)$/);
config.externals(/^(react|react-native|react-native-webview)$/);
} else {
// In browser environments, we must ensure that React dependencies are not
// included or `required` anywhere, so we force these modules to be replaced
Expand Down

0 comments on commit 520e510

Please sign in to comment.