import-weapp
import weapp native component for mpvue
Last updated 10 months ago by cxnao100 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install import-weapp 
SYNC missed versions from official npm registry.

Forked from webpack-contrib/copy-webpack-plugin

Author: Len Boyette

License: MIT

简介:根据json文件usingComponents自动引入组件,兼容mpvue-entry

支持最新版本mpvue, 请按照如下用法进行配置


Webpack Plugin Import Weapp Component

Import wechat app native component

Install

npm i -D import-weapp-component

Usage

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 配置路径
    })
  ]
}

Current Tags

  • 4.7.3                                ...           latest (10 months ago)

1 Versions

  • 4.7.3                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (10)
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |