-
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/cli): enable full node module resolution for project deps #6276
Conversation
@@ -67,7 +67,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { | |||
devtool: buildOptions.sourcemaps ? 'source-map' : false, | |||
resolve: { | |||
extensions: ['.ts', '.js'], | |||
modules: [nodeModules], | |||
modules: ['node_modules', nodeModules], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between modules: ['node_modules', nodeModules],
and just modules: ['node_modules']
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It provides a fallback to the project's node modules. Useful for linked modules with peer dependencies. When such a package is installed normally the peer dependencies would normally be located in the project's node modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get it now, it's for when the linked library does not contain the peerDep but the app does. 👍
Blocked on angular#6276.
Blocked on angular#6276.
I've just validated this fix for my use cases, and it looks great! Thanks for your help @clydin. |
Blocked on angular#6276.
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. |
As discussed in issue #6248.
Closes #6248