Styled-components-website: Lazyload live editor

Created on 19 Nov 2019  路  8Comments  路  Source: styled-components/styled-components-website

The styled-components.com website has a main JS bundle of ~818kB min+gzip, which is way too much. See this WebPageTest: https://www.webpagetest.org/result/191116_RY_98247762e3a552fd20d4c98a97ed8604/

While our first paint is okay-ish thanks to SSR, the website takes forever to become interactive. I am guessing most of the weight is from the live editor, so a good first step would be to lazy load that.

good first issue help wanted

Most helpful comment

Hi @mxstbr, i can start working on it

All 8 comments

Hi @mxstbr, i can start working on it

Yes please!

Hello @mxstbr, is this still open?

Fairly sure it still is :)

live-edit-lazy-load

@mxstbr I was able to dynamically load the LiveEdit from components/LiveEdit. Reduced the index bundle size from 900KB to 642KB . However there is some issue with styling. LiveEdit component has some styling defined which is different from the index page.

What is the course of action here ? Create another component , that will lead to duplication of LiveEdit . Or the horizontal layout is okay ?

Hey @kapilgorve what's the status of this PR and issue? Looks like you've made a draft PR but wondered if it was ready for a code review?

@kwaimind Yeah I think it's good for reviewing. Just not sure about styling change.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pronevich picture pronevich  路  3Comments

el1f picture el1f  路  4Comments

x3388638 picture x3388638  路  5Comments

mxstbr picture mxstbr  路  7Comments

mxstbr picture mxstbr  路  4Comments