Skip to content
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

Slow Page Transition with Flash Prevention Plugin #1675

Open
billmcgrane opened this issue Jan 23, 2024 · 4 comments
Open

Slow Page Transition with Flash Prevention Plugin #1675

billmcgrane opened this issue Jan 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@billmcgrane
Copy link

🐞 Bug report

Description

🔬 Minimal Reproduction

Create Angular 16+ app using scullyio and the flash prevention plugin. Observe the transition time from the prerendered page to the dynamic page generated by the SPA.

💻Your Environment

Angular Version:



Angular CLI: 17.1.0
Node: 18.17.1
Package Manager: npm 8.18.0
OS: darwin arm64

Scully Version:



"@scullyio/init": "^2.1.41",
"@scullyio/ng-lib": "^2.1.41",
"@scullyio/scully": "^2.1.41",
"@scullyio/scully-plugin-flash-prevention": "^2.1.41",
"@scullyio/scully-plugin-puppeteer": "^2.1.41",

🔥 Exception or Error



"Scully is using timeouts, add the needed polyfills instead!"

The needed polyfill, zone.js/dist/task-tracking, is no longer exported as of Angular 16 
and therefore cannot be specified as a polyfill. This results in the transition from the 
prerendered to dynamic page taking much longer than normal. 

@billmcgrane billmcgrane added the bug Something isn't working label Jan 23, 2024
@billmcgrane
Copy link
Author

The behavior is seen with zone.js 0.14.3

@hisham
Copy link

hisham commented Mar 29, 2024

I can confirm this is happening, we recently upgraded to angular 17.

@SanderElias - any planned fixes or recommended workarounds? Seems like an important issue.

@billmcgrane
Copy link
Author

billmcgrane commented Mar 30, 2024 via email

@hisham
Copy link

hisham commented Apr 5, 2024

Thanks @billmcgrane for the message. Angular 17 however requires 0.14.3.

I ended up resolving this however. In Angular 17.3, I don't see any flash when moving from static to dynamic site. So there is no need for the flash prevention plugin from what I see. Angular seems to be doing something where it takes over the pre-rendered html without causing flash. It might be related to the non-destructive hydration improvements Angular recently made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants