How does the webpack refer to the js and css of bootstrap inside downloaded by npm?

  node.js, question

Here’s the thing:
My project is built with webpack. Now I want to use bootstrap in the project. How should I introduce it?

I saw some posts on the internet saying, “direct request (“bootstrap “); However, this is not possible, only js is quoted.
In addition, I have to make less compilation of bootstrap to realize customization. How can I do this?

In my opinion, it should not be that I first enter bootstrap under node_modules, compile grunt, and then copy the generated css and js to the source folder of my project, inside?
It’s so complicated. . No one should use it. . .

Ask for help. . The front-end girl is really going to be forced to cry. . Head dizzy T_T

I don’t know if the problem of the subject has been solved, and if so, what method is used?
I also encountered the same problem. I found itbootstrap-loaderThis bag is found to be usable. By installing this package, css and js files of bootstrap can be introduced. Of course, svg and font loader (I used webpack) need to be configured slightly. During installation, C plus compiler is automatically called to compile, and the waiting time is slightly longer than that of ordinary packages.

However, jquery still has some problems if it is directly configured by bootstrap-loader’s readme. It can be declared globally and put into the entry file (refer toHere):

global.jQuery = require('jquery');

Also post my webpack.config.js:

module.exports = {
    entry: "./entry.js",
    output: {
        path: __dirname,
        filename: "bundle.js"
    },
    module: {
        loaders: [

            { test: /\.css$/, loader: 'style-loader!css-loader' },
            { test: /\.eot(\?v=\d加\.\d加\.\d加)?$/, loader: "file" },
            { test: /\.(woff|woff2)$/, loader:"url?prefix=font/&limit=5000" },
            { test: /\.ttf(\?v=\d加\.\d加\.\d加)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" },
            { test: /\.svg(\?v=\d加\.\d加\.\d加)?$/, loader: "url?limit=10000&mimetype=image/svg加xml" }
        ]
    }
};