const patchMpWeixinVendor = require('./scripts/patch-mp-weixin-vendor') class PatchMpWeixinVendorPlugin { apply(compiler) { compiler.hooks.afterEmit.tap('PatchMpWeixinVendorPlugin', () => { try { patchMpWeixinVendor() } catch (e) {} }) } } module.exports = { chainWebpack: (config) => { config.plugin('patch-mp-weixin-vendor').use(PatchMpWeixinVendorPlugin) } }