-
Notifications
You must be signed in to change notification settings - Fork 280
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
Open
brenelz
wants to merge
48
commits into
solidjs:main
Choose a base branch
from
brenelz:reduce-bundle-size
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Reduce bundle size #906
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
cc816e2
Reduce bundle size
brenelz accb27a
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 256f057
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] ea51352
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 11e4bd7
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] b163a5d
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 2e7d38d
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] b8a72ca
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 412bf95
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] fc2977a
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] a86c6c0
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 8bcf6e9
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] b1b1982
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] cfedaea
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 4d0cfc7
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] edbc804
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] c51fb3d
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 191ba63
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 9b98b5b
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 9a6e244
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] f4840e6
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 9826da5
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] be83113
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] d14512c
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 7b96246
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 9cc0586
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] eb8821e
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 1734004
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] fb7a131
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 7b7025b
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 8d8a692
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 0ad5e4f
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] f7d0bcc
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 60fc2f3
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 6684853
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 24d8e13
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] be3c86c
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 3cc5841
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 4e5519a
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 83eb2e0
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] c1f0b8b
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 6ce4053
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 907faea
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 053d557
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] bb6c183
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] b2f7eb9
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] 265dfec
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] cdb50f9
Merge branch 'main' into reduce-bundle-size
kodiakhq[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,6 @@ | ||||||
|
||||||
import { cache, createAsync } from "@solidjs/router"; | ||||||
import { codeToHtml } from "shiki"; | ||||||
import { createResource } from "solid-js"; | ||||||
|
||||||
export const counterTxt = `import { createSignal } from "solid-js"; | ||||||
|
||||||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"use server"; | ||||||
const code = counterTxt.trim(); | ||||||
return codeToHtml(code, { | ||||||
lang: "tsx", | ||||||
theme: "material-theme-ocean", | ||||||
}); | ||||||
}; | ||||||
}, "render-code"); | ||||||
|
||||||
export default function CodeSnippet() { | ||||||
const [code] = createResource(renderCode); | ||||||
const code = createAsync(() => renderCode()); | ||||||
|
||||||
// eslint-disable-next-line solid/no-innerhtml | ||||||
return <div innerHTML={code()} />; | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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?