You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected this log statement to be executed twice, once for electron-renderer and once for web, as the
npm run start
script is supposed to start both the Electron and Web apps.
"start": "npm-run-all -p electron:serve ng:serve"
However, the log statement is only executed once, and config.target is always web.
For the simple app present with this boilerplate both "electron" and "web" apps start and work fine when we do npm run start but for a more complex app where more electron deps are involved it will become a real problem that
config.target is always web. in the angular.webpack.js script.
This behavior prevents me from adding custom angular.webpack.js logic based on the config.target value, such as:
if (config.target == "electron-renderer") require("electron");
is intended for development and works fine for simple apps. However, for more complex apps with additional Electron dependencies, the issue becomes apparent.
I'm looking for a way to correctly set and detect the config.target value during development, so I can develop an app that works both in Electron and a web browser.
Any guidance would be appreciated.
The text was updated successfully, but these errors were encountered:
starts a single server on port 4200 from which both the "electron" and "web" are served. The single server uses the "web" build (electron should use a different build not the "web"!)
this is another way of explaining the same issue.
"electron" should start its own server/build and "web" should start is own server/build on different ports.
I'm encountering an issue with the config.target in the angular.webpack.js file when running the
npm run start
,script which is intended for simultaneous "electron" and "web" in development (``````"start": "npm-run-all -p electron:serve ng:serve"```)
To illustrate the issue, I added the following console.log statement at the end of the angular.webpack.js file:
I expected this log statement to be executed twice, once for electron-renderer and once for web, as the
npm run start
script is supposed to start both the Electron and Web apps.
"start": "npm-run-all -p electron:serve ng:serve"
However, the log statement is only executed once, and config.target is always web.
For the simple app present with this boilerplate both "electron" and "web" apps start and work fine when we do
npm run start
but for a more complex app where more electron deps are involved it will become a real problem thatconfig.target is always web. in the angular.webpack.js script.
This behavior prevents me from adding custom angular.webpack.js logic based on the config.target value, such as:
if (config.target == "electron-renderer") require("electron");
This issue seems to be related to
#721
The npm run start script, which is defined as
"start": "npm-run-all -p electron:serve ng:serve"
,is intended for development and works fine for simple apps. However, for more complex apps with additional Electron dependencies, the issue becomes apparent.
I'm looking for a way to correctly set and detect the config.target value during development, so I can develop an app that works both in Electron and a web browser.
Any guidance would be appreciated.
The text was updated successfully, but these errors were encountered: