1.0.13 • Published 2 years ago

@remax/plugin-wx-shake v1.0.13

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@remax/plugin-wx-shake

用于移除微信协议隐私中没使用过的wx接口

该插件源于Remax好友 @BlackCloud37 编写。

注意!!! 只能移除小程序中没有使用的wx接口,如果使用到接口请不要移除,否则会导致小程序无法正常运行

安装

$ npm install @remax/plugin-wx-shake --save
或者
$ yarn add @remax/plugin-wx-shake -D

使用

// remax.config.js
const WxShake = require('@remax/plugin-wx-shake');

module.exports = {
    plugins: [WxShake()],
};

配置

支持传入参数数组,当有参数时会使用开发者参数代替默认参数,如果不传则使用默认参数。

默认以下接口数组。

const defaultShakeApiList = [
    'getWeRunData',
    'chooseLocation',
    'chooseInvoiceTitle',
    'chooseInvoice',
    'chooseImage',
    'chooseMedia',
    'chooseLicensePlate',
    'openBluetoothAdapter',
    'createBLEPeripheralServer',
    'addPhoneContact',
    'addPhoneRepeatCalendar',
    'addPhoneCalender',
    'saveFileToDisk',
]
// remax.config.js
const WxShake = require('@remax/plugin-wx-shake');

// eg: 只需要移除微信运动接口(接收参数为一个数组,请勿解构)
const apiList = ['getWeRunData']

module.exports = {
    plugins: [WxShake(apiList)],
};

LICENSE

MIT

1.0.11

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.9

2 years ago

1.0.10

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago