Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

ngconfig.json is a bad pattern #576

Closed
alexeagle opened this issue Oct 4, 2016 · 5 comments
Closed

ngconfig.json is a bad pattern #576

alexeagle opened this issue Oct 4, 2016 · 5 comments

Comments

@alexeagle
Copy link

I created the ngc configuration in such a way that it can live in the tsconfig.json file along with typescript settings.
Ultimately the plan is for tsc to replace ngc once the extensibility-model branch is worked out.

Users should not need a separate copy of their tsconfig.json just to run ngc on it. This antipattern exists in the universal examples which makes me concerned that lots of users are copy-pasta into their apps and losing maintainability and reproducibility...

@MarkPieszak
Copy link
Member

Good idea!

Another thing is maybe we should re-label the "examples" to "testing-playground" or some other name. It's used just so that we can test changes made to Universal/etc modules, and run through some live pseudo scenarios. Ideally we don't want people to follow what's going on in those since the setup is crazy!

@PatrickJS
Copy link
Member

good point. /examples should be renamed to /playground. the examples folder was also confusing other developers

@PatrickJS
Copy link
Member

As mentioned in ngTeam slack, ngc has problems with multiple entry files. For example, if I have app.browser.module.ts and app.node.module.ts ngc will say that the App component is used in two MainModules which is true but they are separate entry files. Also in those files I also need to import a direct path to the platform so angular2-universal/node and angular2-universal/browser rather than angular2-universal which uses the package.json browser field
https://github.com/defunctzombie/package-browser-field-spec

tsAlex also mentioned Microsoft/TypeScript/issues/9876 typescript@next has this feature to help with this

@PatrickJS
Copy link
Member

closing this since we need to create a tsconfig for each platform

@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 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants