Skip to content

Commit

Permalink
chore: Optimise Uint8Array creation in build
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmilton committed Oct 27, 2024
1 parent e684b01 commit 74da096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function compileCSS(src: string, from: string) {
// TODO: Migrate to bun CSS handling (which is based on lightningcss).
const minified = lightningcss.transform({
filename: from,
code: new Uint8Array(Buffer.from(compiled.css)),
code: new TextEncoder().encode(compiled.css),
minify: !dev,
// eslint-disable-next-line no-bitwise
targets: { chrome: 123 << 16 }, // matches manifest minimum_chrome_version
Expand Down

0 comments on commit 74da096

Please sign in to comment.