react-native-monorepo-config 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2025 Satyajit Sahoo
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/index.js
CHANGED
|
@@ -185,8 +185,8 @@ export function withMetroConfig(baseConfig, { root, dirname, workspaces }) {
|
|
|
185
185
|
resolveRequest: (originalContext, moduleName, platform) => {
|
|
186
186
|
let context = originalContext;
|
|
187
187
|
|
|
188
|
-
// Prefer the source field for monorepo packages to consume source code
|
|
189
|
-
if (packages
|
|
188
|
+
// Prefer the source field for monorepo packages and their subpaths to consume source code
|
|
189
|
+
if (Object.keys(packages).some((name) => moduleName.startsWith(name))) {
|
|
190
190
|
context = {
|
|
191
191
|
...context,
|
|
192
192
|
mainFields: ['source', ...context.mainFields],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-monorepo-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Configure Metro for a React Native app in a monorepo",
|
|
5
5
|
"repository": "https://github.com/satya164/react-native-monorepo-config",
|
|
6
6
|
"author": "Satyajit Sahoo <satyajit.happy@gmail.com> (https://github.com/satya164/)",
|