Repository navigation
chore(deps): vite 8 (Rolldown) - #11
Merged
Merged
Conversation
Vite 6.4.5 -> 8.3.5 for the library, the site and the map0-check build. Rolldown and Oxc replace Rollup and esbuild. esbuild leaves the dependency graph, so its allowBuilds entry goes too. Vitest 5 runs on Vite 8 as it is. - build.rollupOptions -> build.rolldownOptions (the old name is a deprecated alias). - Vite 8 strips legal comments whenever it minifies. The library and the site set output.comments.legal, so the licence headers of Lit, DOMPurify and jsPDF stay in the chunks, as they did with esbuild. - scripts/check-size.mjs dropped a static edge when the same chunk also import()ed the same file. Rolldown merges print into the engine chunk, which imports MapLibre both ways, and the whole map tier was reported as deferred. The filter is gone; on the Vite 6 dist it changes nothing. - Rolldown does not hoist transitive imports, so the configurator entry no longer imports MapLibre at all. copyMaplibreDist still fails a misplaced chunk (tried with a chunks/ subfolder), and the site keeps its flat entry keys. docs/09 section 5 says what else changed: no entry facade, index chunks named after their directory (src-, esm-, lib-, dist-), 50-byte facades for ineffective dynamic imports. Page tier 35.3 -> 34.1 KB gzip (33.8 without the licence headers), first map 477.8 -> 475.3 KB, on demand 602.3 -> 580.3 KB.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-mud-0c9fbf503-11.westeurope.7.azurestaticapps.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Vite 6.4.5 → 8.3.5 for the library, the site and the
map0-checkbuild. Rolldown and Oxc replace Rollup and esbuild, so esbuild leaves the dependency graph. Vitest 5 runs on Vite 8 unchanged.Three things Rolldown does differently, in the code comments and in
docs/09§5:comments.legal = !minify). That stripped 34 of 35@licenseheaders (Lit ×12, DOMPurify, jsPDF).output.comments.legalbrings them back, as esbuild kept them. The cost is 0.3 KB of the page tier. Drop the two lines if the THIRD-PARTY-NOTICES file is enough.printinto the engine chunk, which then imports MapLibre statically and viaimport().check-size.mjsdiscarded static edges to files that were also dynamic targets, so the whole map tier showed up as "deferred". On the Vite 6 dist the fix changes nothing (0 tier changes).hoistTransitiveImportsis "not implemented yet"), so the configurator entry no longer imports MapLibre at all. The flat entry keys (02a7600) and thecopyMaplibreDistguard stay. The guard still fires under Rolldown: achunks/subfolder fails the build with the intended message.Chunk layout,
packages/ui/dist(hash-normalised):Every named feature chunk (popup, measure, print-dialog, add-layer-dialog, file-import, jspdf, purify, …) keeps its name. In
dist-sitethe HTML file list is identical,assets/is still flat, and no Ace worker or mode file is emitted. Each page has 8modulepreloadhints instead of 5.Evidence
pnpm size, KB gzip:Run locally on this branch (Windows on ARM), all green:
pnpm typecheck,pnpm test(377, Vitest 5.0.5 on Vite 8),pnpm buildpnpm smoke80/80,pnpm visual12/12 (win32 baselines; CI compares against linux)pnpm size,pnpm build:sitemap0-checktarball: built, packed and verified. The bundle went from 100.6 to 103.5 KB because the unminified output now carries// modulecomments. It still contains the same 18 modules, no MapLibre and no jsPDF.pnpm build:npm(same 36 third-party notices),e2e/verify-tarball.mjs8/8,e2e/verify-types.mjs11/11e2e/verify-demos.mjsagainst the Vite 8 dev server: 50/50/assetsreference in the built HTML and every relative import or preload path in the chunks resolves (622 refs, 0 missing).pnpm dev) and the build (pnpm serve):assets/configurator-index-*.jsMerge Danger
Door: two-way. It is one commit: reverting it and running
pnpm installrestores Vite 6.Blast Radius: bundle layout.
map0-viewer'sdist/gets different chunk names and four more files. Consumers who deploy "the folder" are unaffected, but anyone who lists chunk files by name (a CSP hash list, a CDN preload) has to follow along. The next release ships this layout. CI runsvisualon linux baselines, which were not run locally (Docker image not pulled).🤖 Generated with Claude Code