Speedy mode is harmful for some production use cases (f.e. server-side rendering, prerendering, especially when glamor used in the library, etc)
nikitaeverywhere opened this issue · 0 comments
nikitaeverywhere commented
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/*