|
@@ -1,4 +1,5 @@
|
|
|
const electron = require('electron');
|
|
|
+const fs = require('fs');
|
|
|
require('./dist/src/app');
|
|
|
|
|
|
// Module to control application life.
|
|
@@ -25,6 +26,18 @@ function createWindow() {
|
|
|
enableRemoteModule: true,
|
|
|
},
|
|
|
});
|
|
|
+
|
|
|
+ // replace IS_ELECTRON to yes, beacause axios relative url
|
|
|
+ const envConfig = path.join(__dirname, './build/env-config.js');
|
|
|
+ fs.readFile(envConfig, 'utf8', function (err, files) {
|
|
|
+ const result = files.replace(/{{IS_ELECTRON}}/g, 'yes');
|
|
|
+ fs.writeFile(envConfig, result, 'utf8', function (err) {
|
|
|
+ if (err) {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
// mainWindow.maximize();
|
|
|
// mainWindow.show();
|
|
|
// and load the index.html of the app.
|