@plugin-light/webpack-plugin-replace-app-id
v1.0.0
Published
<p align="center"> <img src="https://img.shields.io/npm/dw/@plugin-light/webpack-plugin-replace-app-id"> <img src="https://img.shields.io/npm/unpacked-size/@plugin-light/webpack-plugin-replace-app-id"> <img src="https://img.shields.io/npm/v/@plugin-
Readme
小程序 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;
};