-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Angular CLI doesn't seem to honor typescript config for Angular Universal App #8749
Comments
The tsconfig shown above does not contain a |
Thank you so much @clydin it seems to solve the problem for now, I will let you know if I see any unexpected behavior :) |
Thanks @naveedahmed1 ! i will check it. |
Great. Closing this then but feel free to re-open if needed. |
Hey @naveedahmed1 i cant understand how the server build aware to this module. if i remove it from the browser routing module it works.... (but i need it there off-course). |
@yosigolan for my case I added below to the ts config for ssr (tsconfig.server.json) and its working:
In my case I have PS: If you rename files, make sure to update |
Thanks @naveedahmed1 ! it solved it. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Repro steps
Let me give you some background.
I have an Angular CLI based project with Universal enabled.
In my project I have
main.ts
which importAppBrowserModule
fromapp.browser.module.ts
and
In my project I have
main.server.ts
which importAppServerModule
fromapp.server.module.ts
I also have a shared module and both
AppBrowserModule
andAppServerModule
import this module.I want to enable Server Side Rendering for a portion of my app. so I have added two different routing modules one for server and other for browser.
AppServerModule
importsAppServerRoutingModule
andAppBrowserModule
importsAppBrowserRoutingModule
.I have below server app added to my
.angular-cli.json
file.Below are the contents of my
tsconfig.app-ssr.json
.As per my understanding, if I generate server bundles through command
ng build --prod --app 1 --output-hashing=false
, it should start fromAppServerModule
and recursively process files referenced in this module. As a result the server bundle should not have the modules that are referenced inAppBrowserRoutingModule
but not inAppServerRoutingModule
.But it does't seem to work this way, cli is adding all modules in server bundle, even those that doesn't have any reference in
main.server
,app.server.modules
orAppServerRoutingModule
.The text was updated successfully, but these errors were encountered: