- The merge reports what it drops. A file that a non-root build has outside its
subdirandsharedDirs, and that the root build has no copy of the same size of, is lost in the merge: a per-build sitemap from@astrojs/sitemap, for example, left the merged site with the root locale's sitemap alone. Such files now warn (pages only when the root build has no such page), even in quiet mode. Comparing sizes takes 0.2 s on catalog.polo.blue's builds. strictfails on a dropped file withDROPPED_FILES(droppedlists the files per target), before anything is copied. A strict run that passed before can fail now: list the files a build emits only to have them dropped in the newignoreDroppedoption.
- TypeScript declarations (
types/), generated from the JSDoc on publish. The config, the results and the page checks are typed:SplitBuildOptions,PageCheck<Result>,PageCheckReport,AssetRefsResult,InternalLinksResult,SplitBuildErrorCode, the hook and logger signatures. No runtime change, and still no dependencies. toPosixPathis exported.SplitBuildError's documented codes includeBROKEN_INTERNAL_LINKSandPAGE_CHECK_FAILED, which it already threw.
First public release.
splitBuild()and theastro-split-buildCLI build each target in turn, save the builds, merge them into oneoutDir(the root target whole, the others'subdironly,sharedDirsfrom every target) and survive the filesystem races of shared hosting (retried copies and removals).- One pass over the merged pages runs every check:
verifyAssets(every/<dir>/<file>reference exists),verifyLinks(internal links, canonicals and hreflang alternates resolve, alternates are reciprocal) and your ownpageChecks.scanPages(),assetRefsCheck,internalLinksCheck,verifyAssetRefsandverifyInternalLinksrun the same checks on a finished build. basechecks a site served under a base path (Astro'sbase), where links and asset references carry the base andoutDirdoesn't. Every page check sees it asbasePath.- An asset reference is a root-relative URL path ending in
/<dir>/<file>:https://cdn.example/_astro/…is another host's file and is not checked. strictfails the run when a non-root target produced nosubdir.examples/astro-i18n: a three-locale Astro site built with the package, with and without a base.
Extracted from catalog.polo.blue, whose production builds (8,600+ pages in three locales) run on it.