@keepsnappy/react-native 0.1.0-alpha.18 → 0.1.0-alpha.19
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/metro.js +11 -1
- package/package.json +1 -1
package/metro.js
CHANGED
|
@@ -172,7 +172,17 @@ const resolveEntry = projectRoot => {
|
|
|
172
172
|
return base + ext;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
// A package path such as Expo Router's `expo-router/entry`, which Metro resolves through node_modules. require.resolve
|
|
176
|
+
// answers a real path; the transformer compares it with Metro's file names, which keep the project root as given.
|
|
177
|
+
try {
|
|
178
|
+
const resolved = require.resolve(main, { paths: [projectRoot] });
|
|
179
|
+
const realRoot = fs.realpathSync(projectRoot);
|
|
180
|
+
return resolved.startsWith(realRoot + path.sep)
|
|
181
|
+
? path.join(projectRoot, path.relative(realRoot, resolved))
|
|
182
|
+
: resolved;
|
|
183
|
+
} catch {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
176
186
|
};
|
|
177
187
|
|
|
178
188
|
function withKeepSnappy(input, { clientPackages = [] } = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keepsnappy/react-native",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.19",
|
|
4
4
|
"description": "KeepSnappy in-app SDK for React Native / Expo: zero-code measurement windows, React commit hook, native signposts and log file",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|