1.0.0 • Published 5 months ago

@plugin-light/webpack-plugin-replace-app-id v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

小程序 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;
};

更新日志

点此查看

1.0.0

5 months ago

0.0.4

1 year ago