aGoodRussianGuy aGoodRussianGuy - 1 year ago 129
Javascript Question

How to find modules in subfolder webpack?

Is there a way to set up webpack to find modules in subfolders like


Answer Source

You are looking for the config option resolve.modulesDirectories:

An array of directory names to be resolved to the current directory as well as its ancestors, and searched for modules. This functions similarly to how node finds “node_modules” directories. For example, if the value is ["mydir"], webpack will look in “./mydir”, “../mydir”, “../../mydir”, etc.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download