import-weapp-native

4.7.3 • Public • Published

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

Package Sidebar

Install

npm i import-weapp-native

Weekly Downloads

1

Version

4.7.3

License

MIT

Unpacked Size

54 kB

Total Files

14

Last publish

Collaborators

  • cxnao100