-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
CSS bundling & general fixes #16486
CSS bundling & general fixes #16486
Conversation
Updated 1:27 PM PT - Jan 18th, 2025
✅ @zackradisic, your commit 85c1d8f has passed in 🧪 try this PR locally: bunx bun-pr 16486 |
.{}, | ||
) catch bun.outOfMemory(); | ||
}, | ||
.css, .file, .toml, .wasm, .base64, .dataurl, .text, .bunsh => {}, |
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.
imagine embedding toml in your css
src/bundler/bundle_v2.zig
Outdated
printer_options, | ||
&css_import.condition_import_records, | ||
) catch { | ||
@panic("TODO: HANDLE THIS ERROR!"); |
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.
does this need to be a todo?
src/resolver/data_url.zig
Outdated
|
||
while (i < text.len) { | ||
const first_byte = text[i]; | ||
const utf8_len = std.unicode.utf8ByteSequenceLength(first_byte) catch { |
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.
don't use std.unicode
var i: usize = 0; | ||
var run_start: usize = 0; | ||
|
||
while (i < text.len) { |
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.
actually delete this entirely
if we need to validate unicode, use simdutf
bun.simdutf.validate.utf8
|
||
// Scan for trailing characters that need to be escaped | ||
var trailing_start = text.len; | ||
while (trailing_start > 0) { |
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.
this loops through the entire input searching for one of 4 characters backwards? is there a way that we can avoid doing this or use simd?
merge conflicts + compiler error |
What does this PR do?