Skip to content

refactor: address issue with bazel resolution of peer dependencies (RC)#31784

Merged
alan-agius4 merged 2 commits intoangular:21.0.xfrom
alan-agius4:pnpm-rc-2
Nov 13, 2025
Merged

refactor: address issue with bazel resolution of peer dependencies (RC)#31784
alan-agius4 merged 2 commits intoangular:21.0.xfrom
alan-agius4:pnpm-rc-2

Conversation

@alan-agius4
Copy link
Collaborator

Key changes include:

  • Removal of PNPM Hook: The .pnpmfile.cjs file, which previously converted peer dependencies into direct dependencies, has been deleted. This workaround is no longer necessary with the adoption of dynamic imports. The MODULE.bazel file has been updated to remove references to it.

  • Dynamic Imports

    • In the build_webpack package, static import statements for webpack and webpack-dev-server are replaced with dynamic import() calls. This defers their loading until they are actively required during the process.
    • In the ssr-dev-server, browser-sync is now loaded using createRequire relative to the workspace root, improving resolution reliability.
  • Build Configuration: Associated BUILD.bazel files have been updated to remove dependency declarations that are now obsolete due to the new lazy-loading approach.

Key changes include:

- **Removal of PNPM Hook:** The `.pnpmfile.cjs` file, which previously converted peer dependencies into
  direct dependencies, has been deleted. This workaround is no longer necessary with the adoption of dynamic
  imports. The `MODULE.bazel` file has been updated to remove references to it.

- **Dynamic Imports**
  - In the `build_webpack` package, static `import` statements for `webpack` and `webpack-dev-server` are
    replaced with dynamic `import()` calls. This defers their loading until they are actively required during
    the process.
  - In the `ssr-dev-server`, `browser-sync` is now loaded using `createRequire` relative to the workspace
    root, improving resolution reliability.

- **Build Configuration:** Associated `BUILD.bazel` files have been updated to remove dependency declarations that are now obsolete due to the new lazy-loading approach.
@alan-agius4 alan-agius4 added the target: rc This PR is targeted for the next release-candidate label Nov 13, 2025
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 13, 2025
@alan-agius4 alan-agius4 marked this pull request as ready for review November 13, 2025 09:24
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 13, 2025
@alan-agius4 alan-agius4 merged commit dea6ced into angular:21.0.x Nov 13, 2025
32 checks passed
@alan-agius4
Copy link
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4 alan-agius4 deleted the pnpm-rc-2 branch November 13, 2025 09:49
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants