mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 01:54:04 +08:00
docs: add windows note to bazel process doc
This commit is contained in:
parent
8345402be5
commit
c8d5c3f602
@ -23,6 +23,25 @@ well. This is to ensure that when users download a published version from NPM,
|
||||
they will be able to install all dependencies correctly without Bazel. It is the
|
||||
responsibility of the developer to keep both `package.json` in sync.
|
||||
|
||||
## Windows support
|
||||
|
||||
In general, any sort of node file lookup on Bazel should be subject to `require.resolve`.
|
||||
This is how rules_nodejs resolves paths using the Bazel runfiles mechanism, where a given
|
||||
Bazel target only has access to outputs from its dependencies.
|
||||
|
||||
In practice, this does not make a lot of difference on Linux.
|
||||
A symlink forest is laid down where the target is going to actually run, and mostly the
|
||||
files are resolved correctly whether you use `require.resolve` or not because the files are there.
|
||||
|
||||
On Windows though, that's a stricter. Bazel does not lay down a symlink forest on
|
||||
windows by default. If you don't use `require.resolve`, it's still possible to correctly
|
||||
resolve some files, like outputs from other rules. But other files, like node modules
|
||||
dependencies and data files, need to be looked up in the runfiles.
|
||||
|
||||
Since the requirement is quite lax on Linux but quite strict on windows, what ends up
|
||||
happening is that lack of `require.resolve` calls go unnoticed until someone tries to run
|
||||
things on Windows, at which point it breaks.
|
||||
|
||||
## Issues
|
||||
|
||||
1. Yarn workspaces is not compatible with Bazel-managed deps
|
||||
|
Loading…
x
Reference in New Issue
Block a user