Skip to content

feat: support scoped workspace source builds - #79

Open
emosheeep wants to merge 2 commits into
rstackjs:mainfrom
emosheeep:feat/scoped-source-build-resolution
Open

emosheeep wants to merge 2 commits into
rstackjs:mainfrom
emosheeep:feat/scoped-source-build-resolution

Conversation

@emosheeep

Copy link
Copy Markdown

Summary

  • scope Rspack source resolution to dependent workspace projects discovered by the active monorepo strategy
  • support global and per-package resolvePriority without adding a separate package-selection API
  • preserve native aliases, dependency conditions, user externals, loader resolvers, child compilers, and source/output fallback behavior
  • rely on Rspack's module graph and watch dependencies instead of manually extending source.include
  • expose the existing monorepo adapter types needed by framework integrations

Compatibility

  • use dependency-specific getResolve when available
  • retain a documented resolver-factory fallback for Rsbuild/Rspack 1.x, including watch dependency propagation
  • add a real-version matrix covering Rsbuild 1.0.1 and 2.1.13

Tests

  • add focused resolver, adapter, Rspack lifecycle, externals, alias, child-compiler, and watch tests
  • add a miniature monorepo fixture covering direct and transitive source dependencies, package-level output priority, undeclared workspace packages, and external node_modules packages
pnpm install --frozen-lockfile
pnpm exec playwright install chromium
pnpm exec rstest run
pnpm lint
pnpm build

Local verification: 24/24 tests passed; Rslint reported 0 errors and 0 warnings; build, formatting, frozen lockfile, and diff checks passed.

Documentation

  • document the scoped resolution model and public options in English and Chinese
  • add contribution guidelines and a pull request template

@emosheeep
emosheeep marked this pull request as ready for review August 21, 2026 07:03

This branch has not been deployed

No deployments
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.

1 participant