-
Notifications
You must be signed in to change notification settings - Fork 68
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
applyDomino not working anymore (incl. 2 MWE's: 1 working, 1 not) #451
Comments
I don't think there's anything we can do about this except for removing the |
@kamilmysliwiec it means that there's nothing we can do to make |
There may be a solution, but I'm not aware of any. We might need to ask the same question in Angular Universal repo instead. |
@kamilmysliwiec might you submit an issue with a link to that one? I'm pretty sure you know more in-depth on how |
@kamilmysliwiec I've found that someone has updated |
I've fixed it by using raw However, it doesn't change the fact that Edit: the final code in main.ts
It must be before you import |
Will there be a fix for this in next release? |
I'm submitting a...
Current behavior
applyDomino
isn't working afterwebpack.server.config.js
has been dropped in Angular 9.Expected behavior
applyDomino
mocks thewindow
object like inng-universal
version 1.2.0 with the presence ofwebpack.server.config.js
.Minimal reproduction of the problem with instructions
ng-universal
withversion
of1.2.0
,webpack.server.config.js
and few changes inangular.json
(Angular 8
): https://github.com/danieldanielecki/universal-nest-working-window (steps to run the project are inREADME.md
).applyDomino
does works in that repo and has an effect during the SSR, which was described in the steps to run the project.Forked from https://github.com/TrilonIO/universal-nest,
ng-universal
with version 3.X.X withoutwebpack.server.config.js
using theAngular Builders
: https://github.com/danieldanielecki/universal-nestapplyDomino
does not work in that repo and has no an effect during the SSRNote: I have forked the project, that's why didn't upgrade it to the latest Nest. However, on my personal project an upgrade from
Angular 8
toAngular 10
/newestNestJS
also throws a similar error related towindow
causing breaking the SSR app without excluding the problematic library. It was not the case before, theDOM
-related objects were mocked up.What is the motivation / use case for changing the behavior?
Some third-party plugins access
window
or any otherDOM
-related objects directly. We need those plugins in our SSR apps. The one-line solution by usingapplyDomino
is a breeze in comparison to the number of hacks we can find online. I was also one of those to admit that on StackOverflow. Maybe it's related to the lack ofWebpackConfigFactory
, which has been dropped. Maybe that's the lack ofwebpack.server.config.js
, but maybe that's something related toAngular Builders
. Another idea is the lack of a bundle anymore. Really don't know, but as you'll be able to see on the MWE's,applyDomino
did work, but does not.If there's something wrong in my setup of the forked repo please submit a pull request to https://github.com/danieldanielecki/universal-nest
It took me quite some time to go through all the online resources, my pre-upgrade legacy project, check out what has changed, create the MWE's, and submit this issue. Would be really appreciated.
Might be related to #163, #429. I've also tried NestJS' Discord, but it didn't solve this issue so I've created MWE's to showcase this black on white.
Environment
The text was updated successfully, but these errors were encountered: