import-weapp-component
v4.7.3
Published
import weapp native component for mpvue
Downloads
14
Maintainers
Readme
Forked from webpack-contrib/copy-webpack-plugin
Author: Len Boyette
License: MIT
简介:根据json
文件usingComponents
自动引入组件,兼容mpvue-entry
支持最新版本mpvue
, 请按照如下用法进行配置
npm i -D import-weapp-component
webpack.config.js
const ImportComponent = require('import-weapp-component')
const config = {
plugins: [
new ImportComponent({
src: path.resolve(__dirname, '../src'), // 引用组件或原生页面的目录
native: true, // 将 src 目录中的原生 page 复制到 dist
usingComponents: path.resolve(__dirname, '../src/page.js') // mpvue-entry 配置路径
})
]
}