-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(@angular-devkit/build-angular): prefer workspace node_modules #18411
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In Webpack absolute and relative paths in resolve.module and resolveLoader.modules behave differently. A relative path will be scanned similarly to how Node scans for node_modules, by looking through the current directory as well as its ancestors (i.e. ./node_modules, ../node_modules, and on). With an absolute path, it will only search in the given directory. With this change we give preference to the workspace level node_nodules directory. Modules resolved with this change ``` /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/@angular/common /workspace/angular-test/client/node_modules/@angular/platform-browser /workspace/angular-test/client/node_modules/@angular/platform-browser /workspace/angular-test/client/node_modules/simple-peer /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/@angular/common /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/rxjs /workspace/angular-test/client/node_modules/debug /workspace/angular-test/client/node_modules/get-browser-rtc /workspace/angular-test/client/node_modules/randombytes /workspace/angular-test/client/node_modules/queue-microtask /workspace/angular-test/client/node_modules/readable-stream /workspace/angular-test/client/node_modules/safe-buffer /workspace/angular-test/client/node_modules/safe-buffer /workspace/angular-test/client/node_modules/safe-buffer /workspace/angular-test/client/node_modules/safe-buffer /workspace/angular-test/client/node_modules/process-nextick-args /workspace/angular-test/client/node_modules/process-nextick-args /workspace/angular-test/client/node_modules/process-nextick-args /workspace/angular-test/client/node_modules/process-nextick-args /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/util-deprecate /workspace/angular-test/client/node_modules/events /workspace/angular-test/client/node_modules/events /workspace/angular-test/client/node_modules/core-util-is /workspace/angular-test/client/node_modules/core-util-is /workspace/angular-test/client/node_modules/core-util-is /workspace/angular-test/client/node_modules/core-util-is /workspace/angular-test/client/node_modules/core-util-is /workspace/angular-test/client/node_modules/isarray /workspace/angular-test/client/node_modules/string_decoder /workspace/angular-test/client/node_modules/ms /workspace/angular-test/client/node_modules/safe-buffer /workspace/angular-test/client/node_modules/buffer /workspace/angular-test/client/node_modules/isarray /workspace/angular-test/client/node_modules/base64-js /workspace/angular-test/client/node_modules/ieee754 ``` Modules resolved before ``` /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/@angular/common /workspace/angular-test/client/node_modules/@angular/platform-browser /workspace/angular-test/client/node_modules/@angular/platform-browser /workspace/angular-test/node_modules/simple-peer /workspace/angular-test/client/node_modules/simple-peer /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/@angular/common /workspace/angular-test/client/node_modules/@angular/core /workspace/angular-test/client/node_modules/rxjs /workspace/angular-test/client/node_modules/debug /workspace/angular-test/node_modules/debug /workspace/angular-test/client/node_modules/get-browser-rtc /workspace/angular-test/node_modules/get-browser-rtc /workspace/angular-test/client/node_modules/randombytes /workspace/angular-test/node_modules/randombytes /workspace/angular-test/client/node_modules/readable-stream /workspace/angular-test/node_modules/readable-stream /workspace/angular-test/client/node_modules/queue-microtask /workspace/angular-test/node_modules/queue-microtask /workspace/angular-test/client/node_modules/simple-peer/node_modules/readable-stream /workspace/angular-test/client/node_modules/safe-buffer /workspace/angular-test/node_modules/safe-buffer /workspace/angular-test/client/node_modules/events /workspace/angular-test/client/node_modules/events /workspace/angular-test/client/node_modules/util-deprecate /workspace/angular-test/node_modules/util-deprecate /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/client/node_modules/inherits /workspace/angular-test/node_modules/inherits /workspace/angular-test/node_modules/inherits /workspace/angular-test/node_modules/inherits /workspace/angular-test/node_modules/inherits /workspace/angular-test/node_modules/inherits /workspace/angular-test/client/node_modules/buffer /workspace/angular-test/client/node_modules/buffer /workspace/angular-test/client/node_modules/buffer /workspace/angular-test/client/node_modules/string_decoder /workspace/angular-test/node_modules/string_decoder /workspace/angular-test/client/node_modules/ms /workspace/angular-test/node_modules/ms /workspace/angular-test/client/node_modules/buffer /workspace/angular-test/client/node_modules/safe-buffer /workspace/angular-test/node_modules/safe-buffer /workspace/angular-test/client/node_modules/base64-js /workspace/angular-test/client/node_modules/ieee754 /workspace/angular-test/client/node_modules/isarray ``` Closes #18396
alan-agius4
added
the
target: patch
This PR is targeted for the next patch release
label
Jul 31, 2020
clydin
approved these changes
Jul 31, 2020
Looking at this a bit more, this change will cause the strandard |
alan-agius4
added
the
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
label
Aug 3, 2020
clydin
pushed a commit
that referenced
this pull request
Aug 5, 2020
…duping With this change we change the `DedupeModuleResolvePlugin` to act similar to `NormalModuleReplacementPlugin` Closes: #18411
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
target: patch
This PR is targeted for the next patch release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Webpack absolute and relative paths in resolve.module and resolveLoader.modules behave differently.
A relative path will be scanned similarly to how Node scans for node_modules, by looking through the current directory as well as its ancestors (i.e. ./node_modules, ../node_modules, and on).
With an absolute path, it will only search in the given directory.
With this change we give preference to the workspace level node_nodules directory.
Modules resolved with this change
Modules resolved before
Closes #18396