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

Index page flashing before a dynamic route is rendered #252

Open
kemalcany opened this issue Dec 14, 2021 · 4 comments
Open

Index page flashing before a dynamic route is rendered #252

kemalcany opened this issue Dec 14, 2021 · 4 comments

Comments

@kemalcany
Copy link

Hi!

An old issue that was resolved few months ago came back.

The index page is flashing very quickly before a dynamic page is rendered

You can see it here:

https://vitesse.netlify.app/hi/something

More info: #159

@userquin
Copy link
Member

It is not back, this page is dynamic and so excluded by default from ssg, I wrote about it on discussions a few months ago.

I am checking how to solve this problem.

See #169

@thuongtruong1009
Copy link

Hi @kemalcany !
Because the content of your landing page is full of content, it will flicker and load the page very quickly. However, when your project has a large number of components, you will find it slows down before the components are rendered.

@userquin
Copy link
Member

userquin commented Feb 19, 2022

@kemalcany @thuongtruong1009 You can check this repo https://github.com/userquin/test-pwa-ts-4.5.5, I have included there a sw router for dynamic pages at first level and some server logic to use it on development (also modified the netlifly configuration but not yet tested). On this repo there is no flash on the dynamic route /hi/:name.

The repo contains the pwa plugin package for some internal tests I'm doing, I have also upload the tar.gz but the repo should also work with the npm version: just run pnpm install && pnpm remove -D vite-plugin-pwa && pnpm i -D vite-plugin-pwa (to include the local version of my tests again just run pnpm add -D ./vite-plugin-pwa-0.11.13.tgz from root folder).

The changes are on this commit userquin/test-pwa-ts-4.5.5@6b6368d:

I'll try to add the app to netlify when I have time.

EDIT: I also change the pwa plugin options to use injectManifest strategy, there is no way to make it work with generateSW strategy: GoogleChrome/workbox#2917 (comment)

@userquin
Copy link
Member

You can test it here: https://optimistic-cray-38ef22.netlify.app/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants