vue中在vue.config.js使用externals引入jquery【cdn】
第一步index.html中引入jquery<scriptsrc="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>第二步vue.config.js配置configureWebpack:{externals: {jquery: "jQuery"}},第三步引入并使用$import $ from
·
第一步index.html中引入jquery
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
第二步vue.config.js配置
configureWebpack:{
externals: {
jquery: "jQuery"
}
},
第三步引入并使用$
import $ from "jquery";
更多推荐
已为社区贡献30条内容
所有评论(0)