-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetro.config.js
31 lines (25 loc) · 1.04 KB
/
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
24
25
26
27
28
29
30
31
const { getDefaultConfig } = require("expo/metro-config");
const path = require("node:path");
const { withNativeWind } = require("nativewind/metro");
const projectRoot = __dirname;
const config = getDefaultConfig(projectRoot);
const { transformer, resolver } = config;
// 1. Watch all files within the monorepo
// 2. Let Metro know where to resolve packages and in what order
config.resolver.nodeModulesPaths = [path.resolve(projectRoot, "node_modules")];
config.transformer = {
...transformer,
babelTransformerPath: require.resolve("react-native-svg-transformer/expo"),
};
config.resolver = {
...resolver,
assetExts: [...resolver.assetExts.filter((ext) => ext !== "svg")],
sourceExts: [...resolver.sourceExts, "svg"],
};
// config.resolver.resolveRequest = (context, moduleName, platform) => {
// if (moduleName === "o1js") {
// return context.resolveRequest(context, "o1js/dist/web", platform);
// }
// return context.resolveRequest(context, moduleName, platform);
// };
module.exports = withNativeWind(config, { input: "./src/global.css" });