How to use `webpack` `require.include`?

After read the webpack doc about require.include, I still don’t understand what does it mean. I write a demo, get the bundle file like this:

undefined/*! require.include ./a.js */;
__webpack_require__(/*! ./b.js */ 2);

As you can see, require.include('./a.js') do not execute the __webpack_require__ function, require('./b.js') execute the __webpack_require__ function. What’s the require.include meaning ? How to use it in real world? Thanks for answer!

Author: Fantashit

1 thought on “How to use `webpack` `require.include`?

Comments are closed.