File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
resources/js/electron-plugin Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,15 @@ const argumentEnv = getArgumentEnv();
25
25
const appPath = getAppPath ( ) ;
26
26
mkdirpSync ( bootstrapCache ) ;
27
27
function runningSecureBuild ( ) {
28
- return existsSync ( join ( appPath , 'build' , '__nativephp_app_bundle' ) ) ;
28
+ return existsSync ( join ( appPath , 'build' , '__nativephp_app_bundle' ) )
29
+ && process . env . NODE_ENV !== 'development' ;
29
30
}
30
31
function shouldMigrateDatabase ( store ) {
31
32
return store . get ( 'migrated_version' ) !== app . getVersion ( )
32
33
&& process . env . NODE_ENV !== 'development' ;
33
34
}
34
35
function shouldOptimize ( store ) {
35
- return store . get ( 'optimized_version' ) !== app . getVersion ( ) ;
36
+ return runningSecureBuild ( ) ;
36
37
}
37
38
function getPhpPort ( ) {
38
39
return __awaiter ( this , void 0 , void 0 , function * ( ) {
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ mkdirpSync(bootstrapCache);
23
23
24
24
function runningSecureBuild ( ) {
25
25
return existsSync ( join ( appPath , 'build' , '__nativephp_app_bundle' ) )
26
+ && process . env . NODE_ENV !== 'development' ;
26
27
}
27
28
28
29
function shouldMigrateDatabase ( store ) {
@@ -31,7 +32,13 @@ function shouldMigrateDatabase(store) {
31
32
}
32
33
33
34
function shouldOptimize ( store ) {
34
- return store . get ( 'optimized_version' ) !== app . getVersion ( ) ;
35
+ /*
36
+ * For some weird reason,
37
+ * the cached config is not picked up on subsequent launches,
38
+ * so we'll just rebuilt it every time for now
39
+ */
40
+ return runningSecureBuild ( ) ;
41
+ // return runningSecureBuild() && store.get('optimized_version') !== app.getVersion();
35
42
}
36
43
37
44
async function getPhpPort ( ) {
You can’t perform that action at this time.
0 commit comments