-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetro.config.js
23 lines (19 loc) · 948 Bytes
/
metro.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Learn more https://docs.expo.io/guides/customizing-metro
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { getDefaultConfig } = require('expo/metro-config');
/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);
config.transformer.getTransformOptions = async () => ({
transform: {
// Inline requires are very useful for deferring loading of large dependencies/components.
// For example, we use it in app.tsx to conditionally load Reactotron.
// However, this comes with some gotchas.
// Read more here: https://reactnative.dev/docs/optimizing-javascript-loading
// And here: https://github.com/expo/expo/issues/27279#issuecomment-1971610698
inlineRequires: true,
},
});
// This helps support certain popular third-party libraries
// such as Firebase that use the extension cjs.
config.resolver.sourceExts.push('cjs');
module.exports = config;