Repository navigation
Bump Vite to 8.3 for the web package - #961
Conversation
Vite 8.0 -> 8.3.4 (rolldown 1.0 -> 1.2). Build output is unchanged in shape: declarations are byte-identical, including the tag-name augmentation, and runtime JS moves by +42 B net (-52 B index.js, +94 B component chunk) from rolldown codegen changes. Also address Vite's forward-compatibility warning for the future native config loader: import package.json with a JSON import attribute and the tag-name-map helper with its file extension.
Bundle Size Budgets
Bundle and package sizeWeb bundle sizes cover shipped runtime JavaScript. Package sizes cover the full published archive, including any source maps, declarations, and documentation it contains.
Web package files (uncompressed)These are uncompressed file sizes; they do not sum to the compressed package size above.
How sizes are measuredMeasured from the PR base SHA and PR head SHA. Web bundle rows sum shipped |
|
|
/accept-size web See Mark's comment - The embedded source code and source-file list are identical. The extra ~7.5 KB is debugging metadata |
Replace vite-plugin-dts (API Extractor) with rolldown-plugin-dts, which keeps `declare global` augmentations in the bundled declarations (microsoft/rushstack#1709). The tag-name collection workaround from #958 (scripts/tag-name-map.ts and its tests) is deleted. The HTMLElementTagNameMap entry moves from register.ts to the class module it describes: both the package root and the component entry import that module, so either import types <shopify-checkout>, and the component entry declaration stays a shim onto the root as before. The custom-elements manifest is unchanged. With #961 (Vite 8.3, Rolldown >= 1.2) and #962 (protocol declarations emittable in isolation), the plugin runs on its default isolated- declarations generator with two config lines: an oxc exclude for emitted declarations and `sideEffects: true`. No tsc-mode workarounds remain. Output: one rolled-up dist/index.d.ts with the same 26 exports as before, the protocol package still inlined, no external imports. Package file set is unchanged. The full web build is ~0.8 s end to end.
Replace vite-plugin-dts (API Extractor) with rolldown-plugin-dts, which keeps `declare global` augmentations in the bundled declarations (microsoft/rushstack#1709). The tag-name collection workaround from #958 (scripts/tag-name-map.ts and its tests) is deleted. The HTMLElementTagNameMap entry moves from register.ts to the class module it describes: both the package root and the component entry import that module, so either import types <shopify-checkout>, and the component entry declaration stays a shim onto the root as before. The custom-elements manifest is unchanged. With #961 (Vite 8.3, Rolldown >= 1.2) and #962 (protocol declarations emittable in isolation), the plugin runs on its default isolated- declarations generator with two config lines: an oxc exclude for emitted declarations and `sideEffects: true`. No tsc-mode workarounds remain. Output: one rolled-up dist/index.d.ts with the same 26 exports as before, the protocol package still inlined, no external imports. Package file set is unchanged. The full web build is ~0.8 s end to end.
What changes are you making?
Bump
vitefrom 8.0.16 to 8.3.4 inplatforms/web(rolldown 1.0.3 → 1.2.13). No code changes beyond two forward-compatibility fixes invite.config.tsthat Vite now warns about: a JSON import attribute onpackage.jsonand an explicit file extension on thetag-name-mapimport (for the future native config loader).Build output compared against 8.0.16 on the same commit:
dist/index.jsdist/shopify-checkout.jsdist/chunks/shopify-checkout.jsdist/index.d.ts,dist/shopify-checkout.d.tsThe tag-name augmentation from #958 is unaffected (declarations identical). Peer ranges for
vitest,@vitest/coverage-v8andvite-plugin-dtsalready cover 8.3.Context: this removes the Rolldown version blocker noted in #958 for
rolldown-plugin-dts. It is deliberately not the plugin swap — the other reasons recorded there (pre-1.0 plugin, protocol-package type workarounds) still apply, and this bump is worth having on its own.How to test
Validated locally: lint, 337 unit tests, build (no config warnings), 9 built-package tests, snapshot, sample build, 16 Chromium tests.
Before you merge
Important