jquery + bootstrap plugin

First, the jqueryenvironment to build

1) installed: a terminal at the distal end project root

cnpm install jquery

2) Configuration: In their new project root directory vue.config.js

const webpack = require("webpack");
module.exports = {
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin({
                $: "jquery",
                jQuery: "jquery",
                "window.$": "jquery",
                "window.jQuery": "jquery",
                Popper: ["popper.js", "default"]
            })
        ]
     }
};

Two, BootStrap environment to build

1) installed: a terminal at the distal end project root

cnpm install bootstrap@3  # 指定版本为3,因为4目前兼容不是很好

2) Configuration: In their new project root directory vue.config.js

import BootStrap from "bootstrap"
import "bootstrap/dist/css/bootstrap.css"
Vue.use(BootStrap)

Guess you like

Origin www.cnblogs.com/cnhyk/p/12354485.html