Full success version VUE-CLI introduced jquery bootstrap popper.js

Source: Internet
Author: User

First step: In the project folder

1, install jquery bootstrap popper.js with NPM or CNPM

For example: CNPM i jquery-s (note that big S can be saved in the Package.json file)

2, observe that there are three items in the Package.json file.

" Bootstrap": "^4.1.3", " jquery": "^3.3.1", " popper.js": "^1.14.4",

Step Two:

Modify the configuration in the Webpack.base.conf.js file under the Build folder:

1, added: const WEBPACK = require (' Webpack ');

2, add plugins inside the Module.exports

module.exports = {plugins: [New Webpack.optimize.CommonsChunkPlugin (' Common '),new Webpack. Provideplugin ({$: ' jquery ',jquery: ' jquery ',Popper: [' popper.js ', ' Default ']})], Step Three: Introduce the following file in Main.js import $ From ' jquery ' import ' Bootstrap/dist/css/bootstrap.min.css ' import ' Bootstrap/dist/js/bootstrap.min ' Next, you can use the Bootstrap class style name.

Full success version VUE-CLI introduced jquery bootstrap popper.js

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.