#ウィジェット#mpvue vant導入の注意点
769 ワード
- vant
- npm install vant-weapp -S --production
-
- /app.json
"usingComponents": {
"van-button": "vant-weapp/dist/button/index"
}
-
hello world!!! click
- webpack.base.config.js
- : node_modules vant-app/dist
if (/^wx$/.test(PLATFORM)) {
baseWebpackConfig = merge(baseWebpackConfig, {
plugins: [
new CopyWebpackPlugin([{
from: resolve('node_modules/vant-weapp/dist'),
to: resolve('dist/wx/vant-weapp/dist'),
ignore: ['.*']
}])
]
})
}
-
- ES5 ES6
- ,