@codemoreira/esad 2.0.1-5 → 2.0.1-7
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/package.json +1 -1
- package/src/cli/utils/scaffold.js +8 -1
- package/src/plugin/index.js +6 -5
package/package.json
CHANGED
|
@@ -75,8 +75,15 @@ async function prepareNative(cwd, platform = 'android') {
|
|
|
75
75
|
if (!content.includes('project.ext.react')) {
|
|
76
76
|
const patch = `\nproject.ext.react = [\n bundleCommand: "repack-bundle",\n bundleConfig: "rspack.config.mjs"\n]\n\n`;
|
|
77
77
|
content = content.replace(/react \{/, `${patch}react {`);
|
|
78
|
+
|
|
79
|
+
// Force androidx.core version to avoid SDK 36 requirement conflict
|
|
80
|
+
if (!content.includes('androidx.core:core:')) {
|
|
81
|
+
const forcePatch = `\nconfigurations.all {\n resolutionStrategy {\n force 'androidx.core:core:1.15.0'\n force 'androidx.core:core-ktx:1.15.0'\n }\n}\n\n`;
|
|
82
|
+
content = forcePatch + content;
|
|
83
|
+
}
|
|
84
|
+
|
|
78
85
|
await fs.writeFile(buildGradlePath, content);
|
|
79
|
-
console.log(`✅ Patched android/app/build.gradle for Re.Pack.`);
|
|
86
|
+
console.log(`✅ Patched android/app/build.gradle for Re.Pack and AndroidX versions.`);
|
|
80
87
|
}
|
|
81
88
|
}
|
|
82
89
|
|
package/src/plugin/index.js
CHANGED
|
@@ -66,11 +66,10 @@ function withESAD(env, options) {
|
|
|
66
66
|
use: {
|
|
67
67
|
loader: 'babel-loader',
|
|
68
68
|
options: {
|
|
69
|
+
babelrc: false,
|
|
70
|
+
configFile: false,
|
|
69
71
|
presets: [
|
|
70
|
-
'
|
|
71
|
-
],
|
|
72
|
-
plugins: [
|
|
73
|
-
['@babel/plugin-transform-react-jsx', { runtime: 'automatic' }],
|
|
72
|
+
'babel-preset-expo',
|
|
74
73
|
],
|
|
75
74
|
sourceType: 'unambiguous',
|
|
76
75
|
caller: { name: 'repack' },
|
|
@@ -85,7 +84,9 @@ function withESAD(env, options) {
|
|
|
85
84
|
use: {
|
|
86
85
|
loader: 'babel-loader',
|
|
87
86
|
options: {
|
|
88
|
-
|
|
87
|
+
babelrc: false,
|
|
88
|
+
configFile: false,
|
|
89
|
+
presets: ['@react-native/babel-preset'],
|
|
89
90
|
sourceType: 'unambiguous',
|
|
90
91
|
caller: { name: 'repack' },
|
|
91
92
|
},
|