@plugin-light/webpack-plugin-gen-mp-plugin-playground
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

生成小程序插件演练场

小程序插件需要一个宿主小程序进行调试,本工具可以帮助 uni-app 项目的小程序插件自动生成这些文件。

如何使用

安装

pnpm add @plugin-light/webpack-plugin-gen-mp-plugin-playground -D

vue.config.js 中添加如下设置:

const { GenMpPluginPlaygroundPlugin } = require('@plugin-light/webpack-plugin-gen-mp-plugin-playground');


module.exports = {
  configureWebpack: {
    plugins: [
      new GenMpPluginPlaygroundPlugin({})
    ]
  }
}

参数

export interface IGenMpPluginPlaygroundOptions {
  // 插件名称
  pluginName?: string;

  // 演练场目录,默认是
  // path.resolve(process.env.UNI_INPUT_DIR, 'mp-plugin-public');
  playgroundDir?: string;

  // 输出目录,默认为 process.env.UNI_OUTPUT_DIR
  outputDir?: string;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @plugin-light/webpack-plugin-gen-mp-plugin-playground

Weekly Downloads

0

Version

0.0.4

License

none

Unpacked Size

4 kB

Total Files

6

Last publish

Collaborators

  • yanggwcn