Skip to content

Commit ea24703

Browse files
fix(cli): udpate metro config for nativewind
1 parent bd374be commit ea24703

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed
Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,12 @@
11
// Learn more https://docs.expo.io/guides/customizing-metro
22
const { getDefaultConfig } = require("expo/metro-config");
3-
const { FileStore } = require("metro-cache");
43
const { withNativeWind } = require("nativewind/metro");
5-
const path = require("node:path");
64

7-
const config = withTurborepoManagedCache(
8-
withNativeWind(getDefaultConfig(__dirname), {
9-
input: "./global.css",
10-
configPath: "./tailwind.config.js",
11-
}),
12-
);
5+
const config = withNativeWind(getDefaultConfig(__dirname), {
6+
input: "./global.css",
7+
configPath: "./tailwind.config.js",
8+
});
139

1410
config.resolver.unstable_enablePackageExports = true;
1511

16-
module.exports = config;
17-
18-
/**
19-
* Move the Metro cache to the `.cache/metro` folder.
20-
* If you have any environment variables, you can configure Turborepo to invalidate it when needed.
21-
*
22-
* @see https://turbo.build/repo/docs/reference/configuration#env
23-
* @param {import('expo/metro-config').MetroConfig} config
24-
* @returns {import('expo/metro-config').MetroConfig}
25-
*/
26-
function withTurborepoManagedCache(config) {
27-
config.cacheStores = [
28-
new FileStore({ root: path.join(__dirname, ".cache/metro") }),
29-
];
30-
return config;
31-
}
12+
module.exports = config;

0 commit comments

Comments
 (0)