Skip to content

chore(build): implement bundler adapter contract - #937

Merged
avivkeller merged 5 commits into
mainfrom
vite
Jul 28, 2026
Merged

chore(build): implement bundler adapter contract#937
avivkeller merged 5 commits into
mainfrom
vite

Conversation

@avivkeller

@avivkeller avivkeller commented Jul 23, 2026

Copy link
Copy Markdown
Member

Note: I used a bit of AI assistance with this PR to resolve some issues with Rolldown->Vite (e.g. virtual modules)

By using Vite (which uses Rolldown internally) in the web generator, we no longer need to maintain a decent amount of custom overhead, including:

  • Custom resolvers
  • Custom CSS transformer (now that we don't use one, we can import CSS from external packages.1)

Additionally, by utilizing Vite's handling of HTML sources, we can reduce our memory by using write: true, and outputting the HTML as they generated (and removing them from memory). This doesn't have a lot of memory, but it does save a look 7-10%.

Footnotes

  1. There was a reason we didn't do it earlier, IIRC it wasn't working, but I'm not 100% sure. Regardless, it works now.

Copilot AI review requested due to automatic review settings July 23, 2026 20:30
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview, Comment Jul 28, 2026 5:19pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nodejs-doc-kit Ignored Ignored Jul 28, 2026 5:19pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.08735% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.52%. Comparing base (cef45ca) to head (3c90f97).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/generators/web/bundlers/vite.mjs 99.00% 3 Missing and 1 partial ⚠️
src/generators/web/utils/processing.mjs 95.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #937      +/-   ##
==========================================
+ Coverage   86.21%   86.52%   +0.31%     
==========================================
  Files         195      195              
  Lines       17690    17974     +284     
  Branches     1609     1633      +24     
==========================================
+ Hits        15251    15552     +301     
+ Misses       2433     2416      -17     
  Partials        6        6              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

api-links Generator

Output: 1 file differs

apilinks.json
Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines

  {
    'Agent.defaultMaxSockets': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L291',
    'Buffer.alloc': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L435',
    'Buffer.allocUnsafe': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L449',
    'Buffer.allocUnsafeSlow': 'https://github.com/nodejs/node/blob/HEAD/lib/buffer.js#L461',
...
    'agent.addRequest': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L356',
+   'agent.createConnection': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L326',
-   'agent.createConnection': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L295',
    'agent.createSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L427',
    'agent.destroy': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L660',
+   'agent.getName': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L484',
-   'agent.getName': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L325',
    'agent.keepSocketAlive': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L616',
    'agent.removeSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L555',
    'agent.reuseSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_agent.js#L652',
    'assert.assert': 'https://github.com/nodejs/node/blob/HEAD/lib/assert.js#L185',
    'asyncResource.asyncId': 'https://github.com/nodejs/node/blob/HEAD/lib/async_hooks.js#L243',
...
    'server.address': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2677',
+   'server.close': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2810',
+   'server.closeAllConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L120',
+   'server.closeIdleConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L122',
-   'server.close': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L671',
-   'server.closeAllConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L681',
-   'server.closeIdleConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L693',
    'server.getConnections': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2772',
    'server.listen': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2474',
    'server.ref': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2915',
+   'server.setTimeout': 'https://github.com/nodejs/node/blob/HEAD/lib/https.js#L124',
-   'server.setTimeout': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L709',
    'server.unref': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2924',
+   'server[SymbolAsyncDispose]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2850',
-   'server[SymbolAsyncDispose]': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L677',
    'server[kDeserialize]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2395',
    'server[kTransferList]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2368',
    'server[kTransfer]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2373',
+   'server[undefined]': 'https://github.com/nodejs/node/blob/HEAD/lib/net.js#L2879',
-   'server[undefined]': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L716',
    'serverresponse._finish': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L246',
    'serverresponse._implicitHeader': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L403',
    'serverresponse.assignSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L296',
    'serverresponse.detachSocket': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L307',
    'serverresponse.statusCode': 'https://github.com/nodejs/node/blob/HEAD/lib/_http_server.js#L269',

Performance estimate (single CI run)

  • Generation time: 33.3% faster (1.32 s → 880.00 ms)
  • Peak memory: 27.3% higher (347.00 MB → 441.84 MB)

legacy-html Generator

Performance estimate (single CI run)

  • Generation time: 5.6% faster (20.26 s → 19.13 s)
  • Peak memory: 0.6% higher (2.33 GB → 2.34 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 2.0% faster (9.17 s → 8.99 s)
  • Peak memory: 0.8% higher (1.76 GB → 1.77 GB)

llms-txt Generator

Performance estimate (single CI run)

  • Generation time: 7.4% slower (8.63 s → 9.27 s)
  • Peak memory: 6.9% lower (1.79 GB → 1.67 GB)

orama-db Generator

Output size: 1 file changed · net -1.08 KB

File size details
File Main PR Change
orama-db.json 8.88 MB 8.88 MB -1.08 KB (-0.0%)

Performance estimate (single CI run)

  • Generation time: 3.5% slower (6.66 s → 6.89 s)
  • Peak memory: 0.5% higher (1.85 GB → 1.86 GB)

web Generator

Output size: 312 files changed · net +605.79 KB

File size details
File Main PR Change
assets/all-CEC2DILy.js 22.09 MB +22.09 MB
all.js 22.09 MB -22.09 MB (-100.0%)
assets/fs-D0zqA_bW.js 1.55 MB +1.55 MB
fs.js 1.55 MB -1.55 MB (-100.0%)
assets/crypto-C9lzROGI.js 1.37 MB +1.37 MB
crypto.js 1.37 MB -1.37 MB (-100.0%)
assets/buffer-4FKkuFq9.js 1.14 MB +1.14 MB
buffer.js 1.14 MB -1.14 MB (-100.0%)
assets/test-ChYBlXf9.js 1.01 MB +1.01 MB
test.js 1.01 MB -1.01 MB (-100.0%)
assets/stream-DDL1vcZa.js 937.49 KB +937.49 KB
stream.js 937.47 KB -937.47 KB (-100.0%)
assets/http2-Dhv6hgZN.js 876.92 KB +876.92 KB
http2.js 876.90 KB -876.90 KB (-100.0%)
assets/util-Cy_5285j.js 796.67 KB +796.67 KB
util.js 796.65 KB -796.65 KB (-100.0%)
assets/http-BvPtpl24.js 761.35 KB +761.35 KB
http.js 761.33 KB -761.33 KB (-100.0%)
assets/process-DPgSpyN8.js 733.94 KB +733.94 KB
process.js 733.92 KB -733.92 KB (-100.0%)
assets/n-api-CZZU2aaT.js 711.18 KB +711.18 KB
n-api.js 711.15 KB -711.15 KB (-100.0%)
assets/events-roCElnB7.js 570.23 KB +570.23 KB
events.js 570.21 KB -570.21 KB (-100.0%)
assets/quic-0Pud6ZeJ.js 563.48 KB +563.48 KB
quic.js 563.46 KB -563.46 KB (-100.0%)
assets/stream_iter-Cm9I8OAy.js 510.52 KB +510.52 KB
stream_iter.js 510.50 KB -510.50 KB (-100.0%)
assets/child_process-CePzN7gy.js 490.99 KB +490.99 KB
child_process.js 490.97 KB -490.97 KB (-100.0%)
assets/assert-vBPxqCoF.js 473.83 KB +473.83 KB
assert.js 473.81 KB -473.81 KB (-100.0%)
assets/vm-Cc8jANgn.js 466.32 KB +466.32 KB
vm.js 466.30 KB -466.30 KB (-100.0%)
assets/webcrypto-DxF7is9Q.js 430.98 KB +430.98 KB
webcrypto.js 430.95 KB -430.95 KB (-100.0%)
assets/worker_threads-gorNEka4.js 421.19 KB +421.19 KB
worker_threads.js 421.17 KB -421.17 KB (-100.0%)
assets/zlib-DJeNxZbf.js 405.35 KB +405.35 KB
zlib.js 405.32 KB -405.32 KB (-100.0%)
assets/perf_hooks-5oiXiWsD.js 384.48 KB +384.48 KB
perf_hooks.js 384.46 KB -384.46 KB (-100.0%)
assets/errors-DBdNutsC.js 373.22 KB +373.22 KB
errors.js 373.19 KB -373.19 KB (-100.0%)
assets/v8-D_iIeX1_.js 366.72 KB +366.72 KB
v8.js 366.70 KB -366.70 KB (-100.0%)
assets/module-BkQKWJv5.js 362.96 KB +362.96 KB
module.js 362.94 KB -362.94 KB (-100.0%)
assets/tls-Cy6RVmEY.js 356.37 KB +356.37 KB
tls.js 356.35 KB -356.35 KB (-100.0%)
assets/net-Dqy7hnOc.js 353.33 KB +353.33 KB
net.js 353.31 KB -353.31 KB (-100.0%)
assets/url-keqhEX3f.js 351.14 KB +351.14 KB
url.js 351.12 KB -351.12 KB (-100.0%)
assets/diagnostics_channel-CPysSURm.js 337.49 KB +337.49 KB
diagnostics_channel.js 337.47 KB -337.47 KB (-100.0%)
assets/webstreams-Quy5DcuO.js 328.11 KB +328.11 KB
webstreams.js 328.08 KB -328.08 KB (-100.0%)
assets/cli-CIAUmw3B.js 316.37 KB +316.37 KB
cli.js 316.35 KB -316.35 KB (-100.0%)
assets/addons-CXfadmXN.js 305.29 KB +305.29 KB
addons.js 305.26 KB -305.26 KB (-100.0%)
assets/sqlite-BlkHlf8s.js 290.43 KB +290.43 KB
sqlite.js 290.41 KB -290.41 KB (-100.0%)
assets/dns-DDEgCIV-.js 290.16 KB +290.16 KB
dns.js 290.14 KB -290.14 KB (-100.0%)
assets/deprecations-oj-Oo2dc.js 279.12 KB +279.12 KB
deprecations.js 279.09 KB -279.09 KB (-100.0%)
assets/readline-DfKB5ufz.js 232.99 KB +232.99 KB
readline.js 232.97 KB -232.97 KB (-100.0%)
assets/async_context-35svDZ9e.js 218.68 KB +218.68 KB
async_context.js 218.66 KB -218.66 KB (-100.0%)
assets/repl-B1nmbuGO.js 207.09 KB +207.09 KB
repl.js 207.07 KB -207.07 KB (-100.0%)
assets/cluster-C-AQ-i1a.js 198.37 KB +198.37 KB
cluster.js 198.35 KB -198.35 KB (-100.0%)
assets/async_hooks-BcVQ1Itj.js 195.28 KB +195.28 KB
async_hooks.js 195.26 KB -195.26 KB (-100.0%)
assets/dgram-BNOqB4Sp.js 193.02 KB +193.02 KB
dgram.js 193.00 KB -193.00 KB (-100.0%)
FunctionSignature-RpeHU_Jm.js 189.94 KB -189.94 KB (-100.0%)
assets/ui-CtCaVM3n.js 189.39 KB +189.39 KB
assets/report-D4_98n0W.js 184.73 KB +184.73 KB
report.js 184.71 KB -184.71 KB (-100.0%)
assets/https-DarAcIR8.js 161.04 KB +161.04 KB
https.js 161.01 KB -161.01 KB (-100.0%)
assets/modules-Bpt2wBxq.js 151.88 KB +151.88 KB
modules.js 151.85 KB -151.85 KB (-100.0%)
assets/packages-DaF0E9en.js 147.40 KB +147.40 KB
packages.js 147.37 KB -147.37 KB (-100.0%)
styles.css 144.52 KB -144.52 KB (-100.0%)
assets/esm-E8hLopAp.js 135.58 KB +135.58 KB
esm.js 135.56 KB -135.56 KB (-100.0%)
assets/globals-BDFqOgIW.js 130.04 KB +130.04 KB
globals.js 130.01 KB -130.01 KB (-100.0%)
assets/ui-MrWT018D.css 126.02 KB +126.02 KB
assets/inspector-C3plsGjy.js 124.68 KB +124.68 KB
inspector.js 124.66 KB -124.66 KB (-100.0%)
assets/os-Dl7HELks.js 110.85 KB +110.85 KB
os.js 110.83 KB -110.83 KB (-100.0%)
assets/ffi-DQHLJJwL.js 109.12 KB +109.12 KB
ffi.js 109.10 KB -109.10 KB (-100.0%)
assets/console-CfdKuCbz.js 106.25 KB +106.25 KB
console.js 106.23 KB -106.23 KB (-100.0%)
assets/timers-DY3HbxfS.js 101.31 KB +101.31 KB
timers.js 101.29 KB -101.29 KB (-100.0%)
assets/dtls-Ddnfg7dr.js 99.62 KB +99.62 KB
dtls.js 99.60 KB -99.60 KB (-100.0%)
assets/path-zDPqyND8.js 99.24 KB +99.24 KB
path.js 99.22 KB -99.22 KB (-100.0%)
assets/debugger-CH-aY0h9.js 94.31 KB +94.31 KB
debugger.js 94.28 KB -94.28 KB (-100.0%)
assets/domain-Dvn3iTpx.js 87.42 KB +87.42 KB
domain.js 87.40 KB -87.40 KB (-100.0%)
assets/single-executable-applications-kjBxOOnV.js 82.54 KB +82.54 KB
single-executable-applications.js 82.52 KB -82.52 KB (-100.0%)
assets/tracing-DLs9CRX2.js 73.90 KB +73.90 KB
tracing.js 73.88 KB -73.88 KB (-100.0%)
assets/open-sans-math-wght-italic-fnaShVx0.woff2 55.20 KB +55.20 KB
assets/open-sans-cyrillic-ext-wght-italic-C5caDWkv.woff2 53.66 KB +53.66 KB
assets/open-sans-math-wght-normal-C1FvUlkR.woff2 50.70 KB +50.70 KB
assets/open-sans-latin-wght-italic-Bf1Hxpwk.woff2 49.04 KB +49.04 KB
assets/tty-D9uVfM02.js 48.25 KB +48.25 KB
tty.js 48.23 KB -48.23 KB (-100.0%)
assets/open-sans-cyrillic-ext-wght-normal-D8xHCTEw.woff2 48.11 KB +48.11 KB
assets/open-sans-latin-wght-normal-CWNzRldh.woff2 47.19 KB +47.19 KB
assets/vfs-CgbyNDfG.js 45.97 KB +45.97 KB
vfs.js 45.95 KB -45.95 KB (-100.0%)
assets/wasi-uGoLb5oK.js 40.83 KB +40.83 KB
wasi.js 40.81 KB -40.81 KB (-100.0%)
assets/open-sans-latin-ext-wght-italic-CT8UZlj2.woff2 36.87 KB +36.87 KB
assets/permissions-taYhW9AG.js 34.82 KB +34.82 KB
permissions.js 34.79 KB -34.79 KB (-100.0%)
assets/open-sans-latin-ext-wght-normal-DPNHYqvY.woff2 34.33 KB +34.33 KB
assets/embedding-oU82-G0W.js 33.42 KB +33.42 KB
embedding.js 33.40 KB -33.40 KB (-100.0%)
assets/intl-DEwtIU0W.js 32.44 KB +32.44 KB
intl.js 32.42 KB -32.42 KB (-100.0%)
assets/open-sans-cyrillic-wght-italic-BHGTCMtU.woff2 31.27 KB +31.27 KB
assets/querystring-Cy4xsTPk.js 29.92 KB +29.92 KB
querystring.js 29.89 KB -29.89 KB (-100.0%)
assets/string_decoder-Dp_Y92gG.js 28.32 KB +28.32 KB
string_decoder.js 28.30 KB -28.30 KB (-100.0%)
assets/open-sans-symbols-wght-normal-BAf6-sld.woff2 25.97 KB +25.97 KB
assets/open-sans-cyrillic-wght-normal-bOs07Rf4.woff2 25.96 KB +25.96 KB
assets/open-sans-symbols-wght-italic-BIea8-3l.woff2 25.75 KB +25.75 KB
assets/punycode-B0RI1WFH.js 24.66 KB +24.66 KB
punycode.js 24.64 KB -24.64 KB (-100.0%)
assets/open-sans-greek-wght-italic-Dymqxqgx.woff2 22.38 KB +22.38 KB
assets/typescript-cyJZ9ovA.js 21.60 KB +21.60 KB
typescript.js 21.57 KB -21.57 KB (-100.0%)
assets/open-sans-greek-wght-normal-8neIfJ3r.woff2 20.83 KB +20.83 KB
assets/open-sans-hebrew-wght-italic-CN0_AmM6.woff2 17.46 KB +17.46 KB
assets/open-sans-vietnamese-wght-italic-CLM9MVT0.woff2 16.81 KB +16.81 KB
assets/open-sans-hebrew-wght-normal-BjjtG49P.woff2 16.52 KB +16.52 KB
assets/open-sans-vietnamese-wght-normal-UygKeDyW.woff2 16.11 KB +16.11 KB
assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 14.36 KB +14.36 KB
assets/CodeBox-CRqxJ3XS.css 14.30 KB +14.30 KB
index.js 13.85 KB -13.85 KB (-100.0%)
assets/index-BKEGgRXL.js 13.83 KB +13.83 KB
assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 13.04 KB +13.04 KB
assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff 12.84 KB +12.84 KB
assets/environment_variables-x0rRCRPK.js 11.73 KB +11.73 KB
environment_variables.js 11.70 KB -11.70 KB (-100.0%)
assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff 11.49 KB +11.49 KB
assets/synopsis-dTkOnk-T.js 11.42 KB +11.42 KB
synopsis.js 11.40 KB -11.40 KB (-100.0%)
assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 8.16 KB +8.16 KB
assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff 7.04 KB +7.04 KB
assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 6.75 KB +6.75 KB
hu-CSjefX1I.js 5.74 KB -5.74 KB (-100.0%)
assets/hu-CsmZ3Bnq.js 5.74 KB +5.74 KB
assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 5.73 KB +5.73 KB
assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff 5.68 KB +5.68 KB
assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff 5.49 KB +5.49 KB
all.html 21.33 MB 21.33 MB -5.45 KB (-0.0%)
zh-BesD0Osc.js 4.89 KB -4.89 KB (-100.0%)
assets/zh-y3uPbUI6.js 4.89 KB +4.89 KB
documentation.js 4.85 KB -4.85 KB (-100.0%)
assets/documentation-Dfeipv02.js 4.84 KB +4.84 KB
assets/open-sans-greek-ext-wght-italic-ZJN3QSAr.woff2 4.73 KB +4.73 KB
assets/open-sans-greek-ext-wght-normal-Bm9CHu9r.woff2 4.40 KB +4.40 KB
ar-B_PYe8-E.js 4.28 KB -4.28 KB (-100.0%)
assets/ar-BVLUHVzV.js 4.27 KB +4.27 KB
np-CiMSixFG.js 3.99 KB -3.99 KB (-100.0%)
assets/np-C8K3gmfG.js 3.99 KB +3.99 KB
es-CXWTbJR_.js 3.62 KB -3.62 KB (-100.0%)
assets/es-BeEdAjWt.js 3.62 KB +3.62 KB
lt-CmXPrZ-P.js 3.47 KB -3.47 KB (-100.0%)
assets/lt-BAxyjCH8.js 3.47 KB +3.47 KB
assets/CodeBox-OhcnL93l.js 3.02 KB +3.02 KB
id-1lgweNNc.js 2.66 KB -2.66 KB (-100.0%)
assets/id-DdyH7Gxj.js 2.66 KB +2.66 KB
bg-D6sDgevR.js 2.40 KB -2.40 KB (-100.0%)
assets/bg-DRX3ZhoB.js 2.39 KB +2.39 KB
ta-BevPRkkf.js 1.96 KB -1.96 KB (-100.0%)
assets/ta-Ckk0lGZr.js 1.96 KB +1.96 KB
in-C0Nu5vDc.js 1.90 KB -1.90 KB (-100.0%)
assets/in-JVmwcUs3.js 1.89 KB +1.89 KB
tr-8Q2M-6U5.js 1.81 KB -1.81 KB (-100.0%)
assets/tr-D3lM6M_k.js 1.81 KB +1.81 KB
quic.html 835.95 KB 834.15 KB -1.80 KB (-0.2%)
fs.html 1.68 MB 1.68 MB -1.68 KB (-0.1%)
it-DzVJYqo-.js 1.66 KB -1.66 KB (-100.0%)
assets/it-BuuPephe.js 1.66 KB +1.66 KB
ro-TCrT--aa.js 1.65 KB -1.65 KB (-100.0%)
assets/ro-D_Gydlvr.js 1.65 KB +1.65 KB
fi-B8U839VI.js 1.58 KB -1.58 KB (-100.0%)
assets/fi-Blo0lLOC.js 1.58 KB +1.58 KB
de-CdA8r7Zk.js 1.36 KB -1.36 KB (-100.0%)
ru-5rgb1b9u.js 1.36 KB -1.36 KB (-100.0%)
assets/de-D30SfcT7.js 1.36 KB +1.36 KB
assets/ru-BiFSjwa8.js 1.36 KB +1.36 KB
http.html 816.63 KB 815.29 KB -1.35 KB (-0.2%)
webcrypto.html 568.07 KB 566.72 KB -1.35 KB (-0.2%)
http2.html 839.47 KB 838.15 KB -1.32 KB (-0.2%)
stream.html 927.94 KB 926.62 KB -1.31 KB (-0.1%)
net.html 461.97 KB 460.66 KB -1.31 KB (-0.3%)
crypto.html 1.22 MB 1.21 MB -1.30 KB (-0.1%)
pt-B0t3H8L5.js 1.28 KB -1.28 KB (-100.0%)
assets/pt-D9bKD3Mv.js 1.28 KB +1.28 KB
tls.html 415.70 KB 414.46 KB -1.24 KB (-0.3%)
webstreams.html 399.04 KB 397.80 KB -1.24 KB (-0.3%)
util.html 736.25 KB 735.02 KB -1.23 KB (-0.2%)
documentation.html 37.92 KB 36.70 KB -1.23 KB (-3.2%)
perf_hooks.html 408.85 KB 407.63 KB -1.22 KB (-0.3%)
diagnostics_channel.html 330.27 KB 329.06 KB -1.21 KB (-0.4%)
dns.html 319.85 KB 318.66 KB -1.19 KB (-0.4%)
v8.html 359.45 KB 358.26 KB -1.19 KB (-0.3%)
zlib.html 381.32 KB 380.13 KB -1.19 KB (-0.3%)
dtls.html 161.89 KB 160.70 KB -1.19 KB (-0.7%)
url.html 364.48 KB 363.30 KB -1.18 KB (-0.3%)
test.html 899.99 KB 898.81 KB -1.18 KB (-0.1%)
sqlite.html 316.49 KB 315.32 KB -1.17 KB (-0.4%)
404.html 29.87 KB 28.70 KB -1.17 KB (-3.9%)
index.html 40.45 KB 39.28 KB -1.17 KB (-2.9%)
ffi.html 144.49 KB 143.33 KB -1.16 KB (-0.8%)
dgram.html 219.27 KB 218.11 KB -1.15 KB (-0.5%)
console.html 149.85 KB 148.71 KB -1.14 KB (-0.8%)
events.html 479.96 KB 478.82 KB -1.14 KB (-0.2%)
os.html 151.78 KB 150.64 KB -1.14 KB (-0.8%)
stream_iter.html 410.59 KB 409.45 KB -1.14 KB (-0.3%)
inspector.html 179.33 KB 178.19 KB -1.14 KB (-0.6%)
worker_threads.html 394.69 KB 393.55 KB -1.13 KB (-0.3%)
path.html 144.95 KB 143.83 KB -1.13 KB (-0.8%)
cluster.html 204.22 KB 203.09 KB -1.13 KB (-0.6%)
readline.html 264.45 KB 263.32 KB -1.13 KB (-0.4%)
tty.html 99.21 KB 98.09 KB -1.12 KB (-1.1%)
modules.html 185.69 KB 184.57 KB -1.12 KB (-0.6%)
globals.html 236.60 KB 235.48 KB -1.12 KB (-0.5%)
timers.html 140.04 KB 138.92 KB -1.12 KB (-0.8%)
errors.html 494.30 KB 493.18 KB -1.12 KB (-0.2%)
punycode.html 64.08 KB 62.97 KB -1.11 KB (-1.7%)
domain.html 106.44 KB 105.33 KB -1.11 KB (-1.0%)
vfs.html 84.79 KB 83.68 KB -1.11 KB (-1.3%)
process.html 720.44 KB 719.34 KB -1.11 KB (-0.2%)
https.html 154.80 KB 153.70 KB -1.11 KB (-0.7%)
querystring.html 66.53 KB 65.43 KB -1.10 KB (-1.7%)
wasi.html 71.59 KB 70.49 KB -1.10 KB (-1.5%)
single-executable-applications.html 108.80 KB 107.70 KB -1.10 KB (-1.0%)
async_context.html 191.77 KB 190.67 KB -1.10 KB (-0.6%)
vm.html 397.30 KB 396.20 KB -1.10 KB (-0.3%)
module.html 352.25 KB 351.15 KB -1.09 KB (-0.3%)
embedding.html 59.30 KB 58.21 KB -1.09 KB (-1.8%)
environment_variables.html 43.92 KB 42.83 KB -1.09 KB (-2.5%)
intl.html 58.02 KB 56.93 KB -1.09 KB (-1.9%)
packages.html 179.08 KB 177.99 KB -1.09 KB (-0.6%)
permissions.html 62.73 KB 61.64 KB -1.09 KB (-1.7%)
report.html 175.80 KB 174.71 KB -1.09 KB (-0.6%)
string_decoder.html 56.51 KB 55.42 KB -1.09 KB (-1.9%)
synopsis.html 42.55 KB 41.46 KB -1.09 KB (-2.6%)
typescript.html 53.35 KB 52.26 KB -1.09 KB (-2.0%)
addons.html 274.71 KB 273.62 KB -1.09 KB (-0.4%)
buffer.html 956.76 KB 955.67 KB -1.08 KB (-0.1%)
deprecations.html 497.93 KB 496.84 KB -1.08 KB (-0.2%)
tracing.html 85.13 KB 84.04 KB -1.08 KB (-1.3%)
n-api.html 811.88 KB 810.80 KB -1.08 KB (-0.1%)
async_hooks.html 162.93 KB 161.85 KB -1.08 KB (-0.7%)
esm.html 158.94 KB 157.86 KB -1.08 KB (-0.7%)
debugger.html 100.66 KB 99.59 KB -1.07 KB (-1.1%)
repl.html 184.12 KB 183.05 KB -1.07 KB (-0.6%)
child_process.html 407.67 KB 406.60 KB -1.07 KB (-0.3%)
assert.html 348.32 KB 347.26 KB -1.06 KB (-0.3%)
ja-CUVEYWC2.js 1.03 KB -1.03 KB (-100.0%)
assets/ja-ByqNX7d9.js 1.02 KB +1.02 KB
cli.html 517.68 KB 516.66 KB -1.02 KB (-0.2%)
en-CjMU5mAi.js 1.00 KB -1.00 KB (-100.0%)
assets/en-B4IUNUV1.js 1.00 KB +1.00 KB
no-DxKP4ouC.js 895.00 B -895.00 B (-100.0%)
assets/no-DiXsJFtf.js 893.00 B +893.00 B
fr-D7bh__e-.js 882.00 B -882.00 B (-100.0%)
assets/fr-Bctpo7_k.js 880.00 B +880.00 B
rs-BSINxu10.js 819.00 B -819.00 B (-100.0%)
assets/rs-1dk9FoVd.js 817.00 B +817.00 B
gr-CoHd_KIF.js 693.00 B -693.00 B (-100.0%)
assets/gr-CR9-XFAF.js 691.00 B +691.00 B
404.js 642.00 B -642.00 B (-100.0%)
assets/404-DVLui6_T.js 627.00 B +627.00 B
se-Cg2LCBzf.js 603.00 B -603.00 B (-100.0%)
assets/se-Tst8tZlp.js 601.00 B +601.00 B
ie-C0gKMtAa.js 593.00 B -593.00 B (-100.0%)
assets/ie-BBC1qJBR.js 591.00 B +591.00 B
nl-Bm-zyNK5.js 497.00 B -497.00 B (-100.0%)
assets/nl-CHyma_Mh.js 495.00 B +495.00 B
dk-wGM1NO8g.js 468.00 B -468.00 B (-100.0%)
assets/dk-CT187ZSJ.js 466.00 B +466.00 B
am-DmCIZ4-O.js 341.00 B -341.00 B (-100.0%)
assets/am-BUEnVSoG.js 339.00 B +339.00 B
uk-DGgO4ltb.js 227.00 B -227.00 B (-100.0%)
sk-DyuRfgPL.js 226.00 B -226.00 B (-100.0%)
assets/uk-s1v_vJI-.js 225.00 B +225.00 B
assets/sk-CNTGQvcv.js 224.00 B +224.00 B

Performance estimate (single CI run)

  • Generation time: 1.9% faster (76.89 s → 75.43 s)
  • Peak memory: 13.4% lower (6.00 GB → 5.20 GB)

@avivkeller

avivkeller commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

-635.66 MB (-10.90%)

That's a good sign

Copilot AI review requested due to automatic review settings July 23, 2026 21:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@avivkeller avivkeller changed the title [wip] vite chore(build): use vite in the web generator Jul 23, 2026
Copilot AI review requested due to automatic review settings July 23, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@avivkeller
avivkeller marked this pull request as ready for review July 23, 2026 21:36
@avivkeller
avivkeller requested a review from a team as a code owner July 23, 2026 21:36
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

PR Summary

High Risk
This is a major build-pipeline swap (Rolldown/custom CSS → Vite) with a breaking generator API and removed config keys, so doc-site output and downstream integrations need careful verification.

Overview
Introduces a WebBundler adapter (render, build, getEntryId) so the web generator no longer owns Rolldown/LightningCSS bundling itself. rolldown and lightningcss config options are removed in favor of optional bundler; when unset, createViteBundler() runs SSR in a temp dir, then uses Vite HTML entries to inject hashed assets and write: true to disk.

The generator is now output-only (Promise<void>): it no longer returns in-memory HTML/CSS or manually writes chunks and styles.css. Server programs export a default async renderer; client/server branching uses #theme/config’s server instead of compile-time SERVER/CLIENT globals.

The HTML template drops import maps and a global stylesheet link; fonts move to @fontsource imports in UI CSS. Docs and tests cover custom adapters, Vite plugins, absolute asset URLs, and SSR temp cleanup.

Reviewed by Cursor Bugbot for commit 3c90f97. Bugbot is set up for automated code reviews on this repo. Configure here.

@avivkeller

Copy link
Copy Markdown
Member Author
Screenshot 2026-07-23 at 2 38 58 PM

Perfomance is up to 91% :-)

Comment thread src/generators/web/bundlers/vite.mjs
@avivkeller avivkeller changed the title chore(build): use vite in the web generator chore(build): implement bundler adapter contract Jul 24, 2026
Copilot AI review requested due to automatic review settings July 24, 2026 17:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread src/generators/web/bundlers/vite.mjs
Copilot AI review requested due to automatic review settings July 24, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 27, 2026 23:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 28, 2026 00:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread src/generators/web/bundlers/vite.mjs
Comment thread src/generators/web/bundlers/vite.mjs
Comment thread src/generators/web/bundlers/vite.mjs
Comment thread src/generators/web/bundlers/vite.mjs
Comment thread src/generators/web/bundlers/vite.mjs

@ovflowd ovflowd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, but could you address my comments?

Also can you verify vite will work in node-core? For all our runners?

@avivkeller

Copy link
Copy Markdown
Member Author

Also can you verify vite will work in node-core? For all our runners?

It'll work in all the runners that currently support building the web generator (i.e. runners without support for specific native bindings will fail, but they wouldn't have enough memory to run the web generator anyway. IMO it's worth the tradeoff of more nonsupport for specific niche runners for faster and lower memory development for all the rest)

Copilot AI review requested due to automatic review settings July 28, 2026 17:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@avivkeller
avivkeller merged commit 43a09f7 into main Jul 28, 2026
27 checks passed
@avivkeller
avivkeller deleted the vite branch July 28, 2026 18:17
@github-actions github-actions Bot mentioned this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants