Open nsbarsukov opened 1 year ago
Error is thrown here: https://github.com/Tinkoff/taiga-ui/blob/856bc574815a7749e86f405b777cc95d686fe55f/projects/core/components/svg/svg.component.ts#L189-L191
It happens because TuiStaticRequestService
uses legacy XMLHttpRequest
https://github.com/Tinkoff/taiga-ui/blob/856bc574815a7749e86f405b777cc95d686fe55f/projects/cdk/services/static-request.service.ts#L19
and it causes this error during SSR:
ReferenceError: XMLHttpRequest is not defined
In this PR legacy XMLHttpRequest
was replaced by modern fetch
:
It was just a small refactor (since Taiga 3.x.x
all our required browser supports fetch
).
But problem still persists - no external icons after SSR.
Even with Node.js >18.0.0 (this version introduces built-in support of fetch
).
Maybe it's a sanitizing issue now?
The new error is the following:
nvm use 18
nx serve-ssr demo
http://localhost:4200
Playground Link
https://github.com/Tinkoff/maskito/actions/runs/4572709295/jobs/8072254292
Description
Reproduction
Run
nx serve-ssr
Taiga UI version
3.22.0
Which operating systems have you used?