chore: configure nativewind styling

This commit is contained in:
baizhi958216
2026-06-30 13:57:25 +08:00
parent c00a8c6ff6
commit c750bd4c94
9 changed files with 52 additions and 18 deletions
+9 -8
View File
@@ -1,20 +1,21 @@
const path = require('path');
const { getDefaultConfig } = require('expo/metro-config');
const path = require("path");
const { getDefaultConfig } = require("expo/metro-config");
const { withNativeWind } = require("nativewind/metro");
const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, '..');
const workspaceRoot = path.resolve(projectRoot, "..");
const config = getDefaultConfig(projectRoot);
config.watchFolders = [workspaceRoot];
config.resolver.alias = {
...config.resolver.alias,
'@infiplot/core': path.resolve(workspaceRoot, 'packages/core/src/index.ts'),
'@infiplot/types': path.resolve(workspaceRoot, 'packages/types/src/index.ts'),
"@infiplot/core": path.resolve(workspaceRoot, "packages/core/src/index.ts"),
"@infiplot/types": path.resolve(workspaceRoot, "packages/types/src/index.ts"),
};
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
path.resolve(projectRoot, "node_modules"),
path.resolve(workspaceRoot, "node_modules"),
];
module.exports = config;
module.exports = withNativeWind(config, { input: "./src/global.css" });