@plugin-light/webpack-plugin-replace-app-id
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

小程序 AppId 转换

可用于动态替换小程序编译产物的project.config.json中的appid,适用于一个子工程下,不同页面属于不同小程序的场景。

如何使用

安装

pnpm add @plugin-light/webpack-plugin-replace-app-id -D

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

const { ReplaceAppIdPlugin } = require('@plugin-light/webpack-plugin-replace-app-id');


module.exports = {
  configureWebpack: {
    plugins: [
      new ReplaceAppIdPlugin({
        appId: 'xxx'
      })
    ],
  }
}

参数

export type IReplaceAppIdOptions = {
  // 将要替换的 appId
  appId: string;
};

Readme

Keywords

none

Package Sidebar

Install

npm i @plugin-light/webpack-plugin-replace-app-id

Weekly Downloads

0

Version

0.0.4

License

none

Unpacked Size

3.04 kB

Total Files

6

Last publish

Collaborators

  • yanggwcn