Project

General

Profile

Actions

Bug #20511

closed

Webpack config should look for nested node_modules

Added by Daniel Lobato Garcia over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Plugin integration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The current value of resolve.modules in config/webpack.config.js is "path.join....'node_modules')".
This value doesn't work when dependencies have been installed using global style (npm install --global-style true).

In this style, which is what foreman-packaging uses, dependencies of dependencies get nested like:

node_modules/dependencyA/node_modules/dependencyB

in a tree like structure. foreman-packaging needs to install in this mode because the npm cache is stored
like a tree.

The solution I've been given in #webpack is to use a string 'node_modules' instead of path.join. The reason is that
webpack purposefully looks for nested dependencies in that case, but not if you provide the full path.

Actions

Also available in: Atom PDF