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

Speedy mode is harmful for some production use cases (f.e. server-side rendering, prerendering, especially when glamor used in the library, etc) #393

Open
nikitaeverywhere opened this issue Apr 7, 2020 · 0 comments

Comments

@nikitaeverywhere
Copy link

nikitaeverywhere commented Apr 7, 2020

Hello! I am writing from react-images library context, which turns to use glamor (or its kinda old version glam) for styles. I know this won't fix this library but at least it will fix all future dependencies.

speedy mode is harmful to applications which are pre-rendered (for example, prerender.io). As a result, search engines do not receive intended CSS (because it is cut by speedy mode in production builds).

The ultra-hack I needed to apply to fix my case was to run through all generated JavaScript code and replace this.isSpeedy there, as the library was already built & compiled:

sed -i 's/this\.isSpeedy\&\&/false\&\&/g' ./build/static/js/*
@nikitaeverywhere nikitaeverywhere changed the title [POSSIBLE_PR] Speedy mode requires manual env variable due to various use cases (f.e. server-side rendering, prerendering, glamor used in the library, etc) [POSSIBLE_PR] Speedy mode is harmful for some production use cases (f.e. server-side rendering, prerendering, especially glamor used in the library, etc) Apr 8, 2020
@nikitaeverywhere nikitaeverywhere changed the title [POSSIBLE_PR] Speedy mode is harmful for some production use cases (f.e. server-side rendering, prerendering, especially glamor used in the library, etc) Speedy mode is harmful for some production use cases (f.e. server-side rendering, prerendering, especially glamor used in the library, etc) Apr 8, 2020
@nikitaeverywhere nikitaeverywhere changed the title Speedy mode is harmful for some production use cases (f.e. server-side rendering, prerendering, especially glamor used in the library, etc) Speedy mode is harmful for some production use cases (f.e. server-side rendering, prerendering, especially when glamor used in the library, etc) Apr 8, 2020
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

1 participant