Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Specify target output (e.g. web, electron-renderer) #5767

Closed
dashkan opened this issue Mar 30, 2017 · 8 comments
Closed

Feature: Specify target output (e.g. web, electron-renderer) #5767

dashkan opened this issue Mar 30, 2017 · 8 comments
Labels
feature Issue that requests a new feature

Comments

@dashkan
Copy link

dashkan commented Mar 30, 2017

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Versions.

@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

Repro steps.

N/A

The log given by the failure.

N/A

Desired functionality.

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.

Mention any other details that might be useful.

Link to webpack target documentation.

@Kaffiend
Copy link

Kaffiend commented Apr 12, 2017

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

@filipesilva
Copy link
Contributor

Currently we don't support other targets, but it's something we're looking at for 2.x.

@mchambaud
Copy link

This is also an issue for anybody trying to use Universal and Angular-CLI

@dolanmiu
Copy link

Is this related to this issue?

#4227

I have having the issue above where it can't find fs, and the solutions on that post did not resolve it

@colinskow
Copy link

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

@Kaffiend
Copy link

Kaffiend commented Aug 7, 2018

@colinskow Very clever indeed, I've implemented it here as well!
https://github.com/Kaffiend/electron-angular-ngrx

@clydin
Copy link
Member

clydin commented Sep 28, 2018

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.

@clydin clydin closed this as completed Sep 28, 2018
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

8 participants