Issue 1:
I recently moved to webpack from require.js and some node_module have .min files built in. When I use a file from node_module I just do require('my-module') and it loads it right away without any config. But this will load the development version or a bigger version.

For example react is loaded require('react/addons') but this is not the minified version.

My question is:

Should I load modules normally and then minify everything?

Should I use their .min files provided and then minify everything again? (in this way I save a lot of disk)

Any better way? Would be nice to automatically loade minified files.

For now, I'm changing the aliases of webpack to load the minified version when building the app:

myConfig.resolve.alias.phaserUnFixed = "nodeModules/phaser/build/custom/phaser-no-physics.min.js";
myConfig.resolve.alias.react = "nodeModules/react/dist/react-with-addons.min.js";
myConfig.resolve.alias.lodash = "nodeModules/lodash/dist/lodash.compat.min.js";
myConfig.resolve.alias.moment = "nodeModules/moment/min/moment.min.js";

But this is not a good approach either... Can you think of anything better?

Issue 2:
Bug report

Hello I had in my package.json

^4.17.2

It auto upgraded to 4.20.3 and then I get the error:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.module.rules[0].exclude should be one of these:
RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? } | [RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
-> One or multiple rule conditions
Details:
* configuration.module.rules[0].exclude should be an instance of RegExp
* configuration.module.rules[0].exclude should be a string.
* configuration.module.rules[0].exclude should be an instance of function
* configuration.module.rules[0].exclude[0] should be an instance of RegExp
* configuration.module.rules[0].exclude[0]: The provided value "node_modules" is not an absolute path!
* configuration.module.rules[0].exclude[0] should be an instance of function
* configuration.module.rules[0].exclude[0] should be an array:
[RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
* configuration.module.rules[0].exclude[0] should be an object.
* configuration.module.rules[0].exclude should be an object.
* configuration.module.rules[0].exclude[0] should be an instance of RegExp
* configuration.module.rules[0].exclude[0]: The provided value "node_modules" is not an absolute path!
* configuration.module.rules[0].exclude[0] should be an instance of function
* configuration.module.rules[0].exclude[0] should be an array:
[RegExp | string | function | [(recursive)] | object { and?, exclude?, include?, not?, or?, test? }]
* configuration.module.rules[0].exclude[0] should be an object.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! p2@0.0.1 dist: `cross-env PRODUCTION=true node_modules/.bin/webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the p2@0.0.1 dist script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

What is the current behavior?

I downgraded to ~4.17.2

I didnt suppose you'd release a breaking change

and such one,

webpack.config.js

relevant part

exclude: ['node_modules']