x)- [ ] bug report -> please search issues before submitting
- [x] feature request
@angular/cli: 1.0.0
node: 7.8.0
os: darwin x64
@angular/animations: 4.0.1
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/flex-layout: 2.0.0-rc.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1
N/A
N/A
In order to target electron-renderer, you currently have to run ng eject and modify the output webpack configuration to update the target.
I propose adding a similar setting to angular-cli.json to specify the intended target.
Link to webpack target documentation.
This would make sense and hold true with the whole "One Framework Mobile & Desktop" goal of angular itself.
I've been keeping tabs on this project @ashkandaie in the mean time, after reading this issue i dont have much hope that electron will be a 1st class citizen with the CLI any time soon. #1774
Currently we don't support other targets, but it's something we're looking at for 2.x.
This is also an issue for anybody trying to use Universal and Angular-CLI
Is this related to this issue?
https://github.com/angular/angular-cli/issues/4227
I have having the issue above where it can't find fs, and the solutions on that post did not resolve it
Here is a very clever hack that is currently working as a postinstall script, which changes the webpack config build target to electron-renderer...
https://github.com/maximegris/angular-electron/blob/master/postinstall.js
@colinskow Very clever indeed, I've implemented it here as well!
https://github.com/Kaffiend/electron-angular-ngrx
There is also https://github.com/manfredsteyer/ngx-build-plus for another unofficial but recommended solution for customization of the underlying webpack configuration.
Closing as there are multiple solutions listed in this thread and this is not something that will be supported directly by the CLI.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Currently we don't support other targets, but it's something we're looking at for 2.x.