-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2b6741
commit 0332c80
Showing
5 changed files
with
54 additions
and
37 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
32 changes: 30 additions & 2 deletions
32
mpc-core-kit-react-native/mpc-core-kit-rn-expo-auth0/metro.config.js
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,31 @@ | ||
require('ts-node/register'); | ||
module.exports = require('./metro.config.ts'); | ||
require("ts-node/register"); | ||
// Learn more https://docs.expo.io/guides/customizing-metro | ||
const { getDefaultConfig } = require("expo/metro-config"); | ||
|
||
/** @type {import('expo/metro-config').MetroConfig} */ | ||
const config = getDefaultConfig(__dirname); | ||
|
||
config.transformer.babelTransformerPath = require.resolve("react-native-react-bridge/lib/plugin"); | ||
config.resolver.extraNodeModules = { | ||
...config.resolver.extraNodeModules, | ||
|
||
assert: require.resolve("empty-module"), // assert can be polyfilled here if needed | ||
http: require.resolve("empty-module"), // stream-http can be polyfilled here if needed | ||
https: require.resolve("empty-module"), // https-browserify can be polyfilled here if needed | ||
os: require.resolve("empty-module"), // os-browserify can be polyfilled here if needed | ||
url: require.resolve("empty-module"), // url can be polyfilled here if needed | ||
zlib: require.resolve("empty-module"), // browserify-zlib can be polyfilled here if needed | ||
path: require.resolve("empty-module"), | ||
crypto: require.resolve("empty-module"), | ||
buffer: require.resolve("@craftzdog/react-native-buffer"), | ||
}; | ||
|
||
// config.resolveRequest = (context, moduleName, platform) => { | ||
// if (moduleName === "crypto") { | ||
// // when importing crypto, resolve to react-native-quick-crypto | ||
// return context.resolveRequest(context, "react-native-quick-crypto", platform); | ||
// } | ||
// // otherwise chain to the standard Metro resolver. | ||
// return context.resolveRequest(context, moduleName, platform); | ||
// } | ||
module.exports = config; |
33 changes: 0 additions & 33 deletions
33
mpc-core-kit-react-native/mpc-core-kit-rn-expo-auth0/metro.config.ts
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
mpc-core-kit-react-native/mpc-core-kit-rn-expo-auth0/package-lock.json
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