How does webpack implement shim of requirejs

  node.js, question

requirejsInrequire.config()After setting the following code in.

shim: {
 'bootstrap': {
 deps: ['jquery', 'css!  ../../../libs/font-awesome/css/font-awesome.min.css']
 },
 'bootstrapTheme': ['jquery', 'bootstrap'],
 'metisMenu': {
 deps: ['jquery']
 bracket

In js require(‘bootstrap’),requirejsAccording to this configuration relationship, priority will be given to loadingjqueryas well asfont-awesome.min.cssIn this way, it is very convenient to manage the dependency of a third-party plug-in.

Then came the question.webpackIs there any similar function? Its shim is similar torequirejsShim does not seem to have the same function and function. How should I implement it?

Can be implemented by loader
Ready-made
https://github.com/webpack/exports-loader
https://github.com/webpack/imports-loader
Or write one yourself