-
Notifications
You must be signed in to change notification settings - Fork 313
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
Docs: Add proper playground #12
Conversation
compressed-size: runtime library Size change: 0.00 kB View unchanged
|
compressed-size: e2e bundles Size change: 0.00 kB View unchanged
|
Yup. Need to tweak some settings to remove the inject calls and add a settings screen to tweak the resolution mode. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
e44ac08
to
a02fa69
Compare
Much better output: https://stylex-6piprzpqr-fbopensource.vercel.app/playground/ |
This output is interesting. We often focus on gzip/br size over the wire, but once unpacked by the browser the minified size matters, and patterns like this minify worse than patterns that don't duplicate the common strings. Not to mention we're creating more objects here too const props = {
0: {
className: "xjyslct xng3xce x1t391ir x1awj2ng x12oqio5 x12ulsxz xdqyycr"
},
1: {
className: "xjyslct xng3xce x1t391ir x1awj2ng x12oqio5 x12ulsxz xdqyycr x4zgh4k"
}
}[!!em << 0]; |
import {files} from './playground-utils/files'; | ||
|
||
async function wcSpawn(instance, ...args) { | ||
console.log('Running:', args.join(' ')); |
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.
Remove this?
}, | ||
}), | ||
); | ||
const exitCode = await process.exit; |
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.
Awaiting a non-function prop?
a02fa69
to
f08938d
Compare
f08938d
to
3b28c6e
Compare
I finally figured this out. As long as you |
We can pack this into smaller string expressions, but it's hard to do that while maintaining className order. We used to do that in the past. |
Here are the plans to improve this situation:
|
087dfed
to
279958f
Compare
279958f
to
0b46504
Compare
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
e962bf8
to
58bd372
Compare
58bd372
to
4c7402e
Compare
4c7402e
to
72fb564
Compare
72fb564
to
8c15b00
Compare
Improve compilation to not insert inject calls Add Vercel headers Configure local development for playground Add codemirror editor Use rollup and static server. Delay preview to wait for built files chore: update to latest StyleX for playground chore: fix build chore: playground actually builds chore: rebase and reinstall
feat: allow file editing and updates the preview update reload button fix: cleanup and improve perf
https://stylex-docusaurus-nxsbvzf80-nmn.vercel.app
For now, this is a proof of concept. I have used a webcontainer to successfully compile and show the output of a file.
The next step is to make improvements until there is a minimal viable experience.
Fixes #732