Introduces AssetDirectoryScanner, StaticFrontendStrategy, and WebBundlerBuild for build-time asset discovery, plus config/docs updates for frontend-type resolution. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
Configuration
WebBundlerConfig is immutable and built with WebBundlerConfig.builder().
Key fields:
runtimeMode:PROD,ENV,AUTODETECToperationMode:ORCHESTRATE_ONLY,MANAGEDfrontendType:VITE,STATIC— seefrontend-selection.mdpackageManager:NPM,PNPM,YARN,BUNinstallPolicy:AUTO_IF_LOCK_HASH_CHANGED,NEVERloggingMode:MERGED,SEPARATE,QUIET,VERBOSEcommandSafetyMode:WARN,BLOCK,ALLOWwebRoot,assetsSource,basePath,devHost,devPort,watchList
Asset source is explicit and object-based:
assetsFromFilesystem(Path.of("dist"))assetsFromClasspath("web/dist")
Or by direct source object:
assetsSource(FilesystemAssetsSource.of(Path.of("dist")))assetsSource(ClasspathAssetsSource.of("web/dist"))
Validation is fail-fast:
- invalid
devPort(only whenfrontendTyperequires orchestration — skipped forSTATIC) - blank/invalid watch entries (same — skipped for
STATIC) - invalid
basePath
frontendType(...) has side effects on other defaults, same pattern as packageManager(...)
resetting watchList: it also resets operationMode (MANAGED for STATIC, ORCHESTRATE_ONLY
otherwise) and assetsSource (webRoot itself for STATIC, webRoot/dist otherwise). Call
.frontendType(...) before any explicit .operationMode(...)/.assetsSource(...)/.assetsFrom*(...)
override, or the later call wins.