jaluik / removeWxPlugin

Webpack plugin to remove unused wx.xxxx method

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

removeWxPlugin

webpack 插件,可以通过配置去除未使用的wx.xxxx方法

usage

const RemoveWxPlugin = require("remove-wx-plugin");

module.exports = {
  //  webpack ...config
  plugins: [
    new RemoveWxPlugin({
      filterList: [
        "onLocationChange",
        "chooseLocation",
        // ...
      ],
    }),
  ],
};

打包的结果中会去除wx.onLocationChangewx.chooseLocation等配置的方法

About

Webpack plugin to remove unused wx.xxxx method


Languages

Language:JavaScript 100.0%