-
Notifications
You must be signed in to change notification settings - Fork 279
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
Reduce bundle size #906
base: main
Are you sure you want to change the base?
Reduce bundle size #906
Conversation
Run & review this pull request in StackBlitz Codeflow. |
✅ Deploy Preview for solid-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for solid-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@atilafassina do you have any thoughts on this? Is it a good approach to reduce bundle size or do we want the highlighter on the client? |
@brenelz |
Just re commenting here for visibility. Is this worth investing some time in? I think its mostly there |
I'd say this is worth investing time in, especially if you have an idea of how to do it and it isn't too complicated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit! 🏆
@@ -1,5 +1,6 @@ | |||
|
|||
import { cache, createAsync } from "@solidjs/router"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { cache, createAsync } from "@solidjs/router"; | |
import { query, createAsync } from "@solidjs/router"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we are on an older version of the router. Should i upgrade the router or leave it as is?
@@ -17,16 +18,17 @@ function Counter() { | |||
|
|||
export const snippetLines = counterTxt.split("\n"); | |||
|
|||
const renderCode = async () => { | |||
const renderCode = cache(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const renderCode = cache(async () => { | |
const renderCode = query(async () => { |
Description(required)
Playing around a bit with bundle size and lighthouse scores on the docs. I wondered if I could improve things by keeping our syntax highligher(shiki) on the server. I will do a bit of testing to see if it actually improves things.
Im realizing its hard to test because of the netlify deploy preview drawer.
(Found a link without the drawer https://66f86aa87b3ff50008d7d297--solid-docs.netlify.app/)
Comparison
Before
After
Related issues & labels