Skip to content

Commit 0613379

Browse files
committed
fix(smol): enable code cache for brotli decompression support
Remove --without-node-code-cache flag from Node.js configure options to enable decompression of brotli-encoded lib/ files at runtime. This is required for: - Decompressing Node.js internal lib/ files (including bootstrap) - Supporting zlib/brotli operations needed by CLI (index.js decompression) The code cache is essential for the smol binary to function correctly since both the Node.js internals and the CLI rely on brotli decompression. Fixes issue where smol binary outputs garbled/compressed code instead of executing JavaScript properly.
1 parent 73aa038 commit 0613379

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/node-smol-builder/scripts/build.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,9 @@ async function main() {
11161116
'--without-amaro',
11171117
'--without-sqlite',
11181118
'--without-node-snapshot',
1119-
'--without-node-code-cache',
1119+
// Note: --without-node-code-cache removed because we need code cache to decompress
1120+
// brotli-encoded lib/ files (including our bootstrap). Zlib/brotli support is
1121+
// required for CLI index.js decompression.
11201122
'--v8-disable-object-print',
11211123
'--without-node-options',
11221124
'--disable-single-executable-application', // -1-2 MB: SEA not needed for pkg

0 commit comments

Comments
 (0)