Skip to content

Commit

Permalink
Merge pull request #16 from lennybakkalian/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lennybakkalian authored Nov 24, 2024
2 parents 45172d4 + 98c0a01 commit 7aa2d87
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export class DemoComponent {
}
```

## Known Issues
* **Headers are not forwarded when performing requests in ssr.**

_Add this provider to your `app.config.server.ts` file to fix this issue:_
```typescript
provideServerRoutesConfig([{path: '**', renderMode: RenderMode.Server}])
```

## TODOs 📝

- [ ] Additional Unit Tests for SSR and WebSocket Subscriptions.
Expand Down
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
],
"scripts": [],
"server": "projects/example/src/main.server.ts",
"outputMode": "server",
"externalDependencies": [""],
"ssr": {
"entry": "projects/example/src/server.ts"
}
Expand Down
6 changes: 5 additions & 1 deletion projects/example/src/app/app.config.server.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import {ApplicationConfig, mergeApplicationConfig} from '@angular/core';
import {provideServerRendering} from '@angular/platform-server';
import {appConfig} from './app.config';
import {provideServerRoutesConfig, RenderMode} from '@angular/ssr';

const serverConfig: ApplicationConfig = {
providers: [provideServerRendering()]
providers: [
provideServerRendering(),
provideServerRoutesConfig([{path: '**', renderMode: RenderMode.Server}])
]
};

export const config = mergeApplicationConfig(appConfig, serverConfig);
2 changes: 1 addition & 1 deletion projects/ngx-trpc/src/lib/rxjs-proxy/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ export interface TRPCSubscriptionObserver<TValue, TError> {
onComplete: () => void;
}

export type YieldType<T> = T extends AsyncGenerator<infer Y> ? Y : never;
export type YieldType<T> = inferAsyncIterableYield<T>;

0 comments on commit 7aa2d87

Please sign in to comment.