Introducing jquery:
1. In cmd input: npm install jquery, enter, wait.
2. Do the following in the Webpack.base.conf.js:
3. Do the following in the Webpack.prod.conf.js:
4. Introduce in the entry file:
Do not know is not a jquery version of the problem, in the reconstruction of the previously written page, by introducing JS in the. vue file in the way to write the JS introduced (the JS file with the jquery plugin), some functional problems
Introduction of Bootstrap
The practice is carried out by reference to the online approach.
Mainly in the configuration file added two configuration files, this two files must be put together
1.bootstrap.config.js file:
Module.exports = {
Default for the style loading
Styleloader:require (' Extract-text-webpack-plugin '). Extract (' Style-loader ', ' css-loader!postcss-loader! Less-loader '),
Scripts: {
' Transition ': true,
' Alert ': true,
' button ': true,
' Carousel ': true,
' Collapse ': true,
' dropdown ': true,
' Modal ': true,
' ToolTip ': true,
' PopOver ': true,
' Scrollspy ': true,
' tab ': true,
' Affix ': true
},
Styles: {
"Mixins": true,
"Normalize": true,
"Print": true,
"Scaffolding": true,
' Type ': true,
"Code": True,
"Grid": true,
"Tables": true,
"Forms": true,
"Buttons": true,
"Component-animations": true,
"Glyphicons": true,
"Dropdowns": true,
"Button-groups": true,
"Input-groups": true,
"Navs": true,
"NavBar": true,
"Breadcrumbs": true,
"Pagination": true,
"Pager": true,
"Labels": true,
"Badges": true,
"Jumbotron": true,
"Thumbnails": true,
"Alerts": true,
"Progress-bars": true,
"Media": true,
"List-group": true,
"Panels": true,
"Wells": true,
"Close": true,
"Modals": true,
"ToolTip": true,
"Popovers": true,
"Carousel": True,
"Utilities": true,
"Responsive-utilities": True
}
};
2.bootstrap.strap.config.less file (It is said to be empty, not tried):
@font-size-base:24px;
@btn-default-color: #444;
@btn-DEFAULT-BG: #eee;
3. The import file is introduced by importing '/path/bootstrap.min.js ';
4.bootstrap styles can be introduced in this way or introduced in index.html;
5. Other plugins can also be imported via import, but some plugins may have problems, the solution itself Google
jquery and Bootstrap are introduced into the scaffolding-built Vue project.