mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
32 lines
1010 B
Handlebars
32 lines
1010 B
Handlebars
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
const { getDefaultConfig } = require("expo/metro-config");
|
|
const { FileStore } = require("metro-cache");
|
|
const { withNativeWind } = require("nativewind/metro");
|
|
const path = require("node:path");
|
|
|
|
const config = withTurborepoManagedCache(
|
|
withNativeWind(getDefaultConfig(__dirname), {
|
|
input: "./global.css",
|
|
configPath: "./tailwind.config.js",
|
|
}),
|
|
);
|
|
|
|
config.resolver.unstable_enablePackageExports = true;
|
|
|
|
module.exports = config;
|
|
|
|
/**
|
|
* Move the Metro cache to the `.cache/metro` folder.
|
|
* If you have any environment variables, you can configure Turborepo to invalidate it when needed.
|
|
*
|
|
* @see https://turbo.build/repo/docs/reference/configuration#env
|
|
* @param {import('expo/metro-config').MetroConfig} config
|
|
* @returns {import('expo/metro-config').MetroConfig}
|
|
*/
|
|
function withTurborepoManagedCache(config) {
|
|
config.cacheStores = [
|
|
new FileStore({ root: path.join(__dirname, ".cache/metro") }),
|
|
];
|
|
return config;
|
|
}
|