Skip to content

Commit 1e17777

Browse files
committed
fix: set the env.skipSnapshotTools based on the skipNativeValue in order to avoid local snapshots along with their requirements during cloud builds
1 parent 9c22e65 commit 1e17777

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/services/webpack/webpack-compiler-service.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,18 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
174174

175175
Object.assign(envData,
176176
appPath && { appPath },
177-
appResourcesPath && { appResourcesPath },
177+
appResourcesPath && { appResourcesPath }
178178
);
179179

180180
envData.verbose = envData.verbose || this.$logger.isVerbose();
181181
envData.production = envData.production || prepareData.release;
182+
// The snapshot generation is wrongly located in the Webpack plugin.
183+
// It should be moved in the Native Prepare of the CLI or a Gradle task in the Runtime.
184+
// As a workaround, we skip the mksnapshot, xxd and android-ndk calls based on skipNativePrepare.
185+
// In this way the plugin will prepare only the snapshot JS entry without any native prepare and
186+
// we will able to execute cloud builds with snapshot without having any local snapshot or Docker setup.
187+
// TODO: Remove this flag when we remove the native part from the plugin.
188+
envData.skipSnapshotTools = prepareData.nativePrepare && prepareData.nativePrepare.skipNativePrepare;
182189

183190
if (prepareData.env && (prepareData.env.sourceMap === false || prepareData.env.sourceMap === 'false')) {
184191
delete envData.sourceMap;

0 commit comments

Comments
 (0)