Skip to content
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

Merged
merged 1 commit into from May 15, 2017
Merged

fix(@angular/cli): enable full node module resolution for project deps #6276

merged 1 commit into from May 15, 2017

Conversation

clydin
Copy link
Member

@clydin clydin commented May 11, 2017

As discussed in issue #6248.

Closes #6248

@@ -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],
Copy link
Contributor

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']?

Copy link
Member Author

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.

Copy link
Contributor

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. 👍

filipesilva added a commit to filipesilva/angular-cli that referenced this pull request May 12, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request May 12, 2017
@jshcrowthe
Copy link

jshcrowthe commented May 15, 2017

I've just validated this fix for my use cases, and it looks great! Thanks for your help @clydin.

@sumitarora sumitarora merged commit e0a454f into angular:master May 15, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request May 16, 2017
sumitarora pushed a commit that referenced this pull request May 17, 2017
@clydin clydin deleted the module-resolution branch May 18, 2017 13:53
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this pull request Apr 23, 2018
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this pull request Apr 23, 2018
@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 Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webpack config not finding nested node_modules
6 participants