new CopyWebpackPlugin([
{
from: resolve(‘node_modules/vant-weapp/dist‘),
to: resolve(‘dist/wx/vant-weapp/dist‘),
ignore: [‘.*‘]
}
])
3.在页面json引入控件
"usingComponents": {
"van-button": "../../vant-weapp/dist/button/index",
"van-cell-group": "../../vant-weapp/dist/cell-group/index",
"van-cell": "../../vant-weapp/dist/cell/index",
"van-icon": "../../vant-weapp/dist/icon/index",
"van-swipe-cell": "../../vant-weapp/dist/swipe-cell/index"
}
原文:https://www.cnblogs.com/fm060/p/12879183.html