Skip to content

Commit

Permalink
Add explicit metro configuration for exports (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer authored Jul 19, 2024
1 parent a1241f5 commit 2cc6e3e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/expo/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { withNativeWind } = require("nativewind/metro");

const path = require("path");

module.exports = withTurborepoManagedCache(
const config = withTurborepoManagedCache(
withMonorepoPaths(
withNativeWind(getDefaultConfig(__dirname), {
input: "./src/styles.css",
Expand All @@ -14,6 +14,12 @@ module.exports = withTurborepoManagedCache(
),
);

// XXX: Resolve our exports in workspace packages
// https://github.com/expo/expo/issues/26926
config.resolver.unstable_enablePackageExports = true;

module.exports = config;

/**
* Add the monorepo paths to the Metro config.
* This allows Metro to resolve modules from the monorepo.
Expand Down

0 comments on commit 2cc6e3e

Please sign in to comment.