chore: configure nativewind styling
This commit is contained in:
+9
-8
@@ -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" });
|
||||
|
||||
Reference in New Issue
Block a user