You can customize resolve.modulesto look at bower_components.
resolve: {
modules: ['bower_components', 'node_modules']
}
First, consider bower_components, and if he cannot find the module, he will consider node_modules. If you do not enable it node_modules, you will not be able to use packages installed from npm.
source
share