Home > Article > Web Front-end > Vue-cli introduces third-party JS and CSS methods in detail
This article mainly shares with you a common method for introducing third-party JS and CSS in Vue cli. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor and take a look. I hope it can help everyone.
The first method:
Introduce
js
<script type="text/javascript" src="static/mui.min.js" ></script>
css
<link rel="stylesheet" href="static/mui.min.css" rel="external nofollow" />
directly into index.html The second way is to use the import method to import
js
import mui from '../../../static/mui.min.js'
css
@import "../../common/stylus/mixin";
in a single page. Just write the path when importing.
Related recommendations:
thinkphp how to introduce third-party classes
vue introduces css, pitfalls and solutions encountered by less Method example sharing
Summary of four ways to introduce css
The above is the detailed content of Vue-cli introduces third-party JS and CSS methods in detail. For more information, please follow other related articles on the PHP Chinese website!