Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit c248b72

Browse files
Force rebuild of application when webpack is used
In case we want to use webpack, force the build by setting nativeChanged property of changesInfo to true. This is TEMP solution until we have a better one.
1 parent 2f6c4e0 commit c248b72

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/before-prepareJS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ module.exports = function ($mobileHelper, $projectData, hookArgs) {
1010
bundle: appFilesUpdaterOptions.bundle,
1111
watch: false // TODO: Read from CLI options...
1212
};
13-
const result = config.bundle && runWebpackCompiler.bind(runWebpackCompiler, config, $mobileHelper, $projectData);
13+
const result = config.bundle && runWebpackCompiler.bind(runWebpackCompiler, config, $mobileHelper, $projectData, hookArgs);
1414
return result;
1515
}

lib/compiler.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ exports.getWebpackProcess = function getWebpackProcess() {
1313
return webpackProcess;
1414
}
1515

16-
exports.runWebpackCompiler = function runWebpackCompiler(config, $mobileHelper, $projectData, originalArgs, originalMethod) {
16+
exports.runWebpackCompiler = function runWebpackCompiler(config, $mobileHelper, $projectData, hookArgs, originalArgs, originalMethod) {
1717
if (config.bundle) {
1818
return new Promise(function (resolveBase, rejectBase) {
19+
if (hookArgs && hookArgs.config && hookArgs.config.changesInfo) {
20+
hookArgs.config.changesInfo.nativeChanged = true;
21+
}
22+
1923
let isResolved = false;
2024
function resolve() {
2125
if (isResolved) return;

0 commit comments

Comments
 (0)