react-native-update-cli 1.18.0 → 1.19.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/lib/bundle.js +9 -3
- package/package.json +1 -1
- package/src/bundle.js +11 -3
package/lib/bundle.js
CHANGED
|
@@ -41,9 +41,9 @@ async function runReactNativeBundleCommand(bundleName, development, entryFile, o
|
|
|
41
41
|
let gradleConfig = {};
|
|
42
42
|
if (platform === 'android') {
|
|
43
43
|
gradleConfig = await checkGradleConfig();
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
if (gradleConfig.crunchPngs !== false) {
|
|
45
|
+
console.warn('android的crunchPngs选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n');
|
|
46
|
+
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
let reactNativeBundleArgs = [];
|
|
@@ -60,6 +60,12 @@ async function runReactNativeBundleCommand(bundleName, development, entryFile, o
|
|
|
60
60
|
paths: [process.cwd()]
|
|
61
61
|
});
|
|
62
62
|
try {
|
|
63
|
+
require.resolve('expo-router', {
|
|
64
|
+
paths: [process.cwd()]
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
console.log(`expo-router detected, will use @expo/cli to bundle.\n`);
|
|
68
|
+
// if using expo-router, use expo-cli
|
|
63
69
|
cliPath = require.resolve('@expo/cli', {
|
|
64
70
|
paths: [process.cwd()]
|
|
65
71
|
});
|
package/package.json
CHANGED
package/src/bundle.js
CHANGED
|
@@ -31,9 +31,11 @@ async function runReactNativeBundleCommand(
|
|
|
31
31
|
let gradleConfig = {};
|
|
32
32
|
if (platform === 'android') {
|
|
33
33
|
gradleConfig = await checkGradleConfig();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
if (gradleConfig.crunchPngs !== false) {
|
|
35
|
+
console.warn(
|
|
36
|
+
'android的crunchPngs选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n',
|
|
37
|
+
);
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
let reactNativeBundleArgs = [];
|
|
@@ -53,6 +55,12 @@ async function runReactNativeBundleCommand(
|
|
|
53
55
|
paths: [process.cwd()],
|
|
54
56
|
});
|
|
55
57
|
try {
|
|
58
|
+
require.resolve('expo-router', {
|
|
59
|
+
paths: [process.cwd()],
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
console.log(`expo-router detected, will use @expo/cli to bundle.\n`);
|
|
63
|
+
// if using expo-router, use expo-cli
|
|
56
64
|
cliPath = require.resolve('@expo/cli', {
|
|
57
65
|
paths: [process.cwd()],
|
|
58
66
|
});
|