Skip to content

Commit bc865bd

Browse files
authored
fix: caching config while in dev will make laravel think it's in elec… (#201)
* fix: caching config while in dev will make laravel think it's in electron all the time * Build plugin
1 parent 33ec37c commit bc865bd

File tree

2 files changed

+3
-2
lines changed
  • resources/js/electron-plugin

2 files changed

+3
-2
lines changed

resources/js/electron-plugin/dist/server/php.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function shouldMigrateDatabase(store) {
3333
&& process.env.NODE_ENV !== 'development';
3434
}
3535
function shouldOptimize(store) {
36-
return true;
36+
return process.env.NODE_ENV !== 'development';
3737
}
3838
function getPhpPort() {
3939
return __awaiter(this, void 0, void 0, function* () {

resources/js/electron-plugin/src/server/php.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ function shouldOptimize(store) {
3838
* the cached config is not picked up on subsequent launches,
3939
* so we'll just rebuilt it every time for now
4040
*/
41-
return true;
41+
42+
return process.env.NODE_ENV !== 'development';
4243
// return runningSecureBuild();
4344
// return runningSecureBuild() && store.get('optimized_version') !== app.getVersion();
4445
}

0 commit comments

Comments
 (0)