Closed openks closed 5 years ago
我没实验,你试下可行?
const webpack = require('webpack') chainWebpack: config => { config.plugin('ignore').use(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)); }
你这个是把所有语言包全删了吧 网上找了个这个。
chainWebpack: (config) => { config.plugin('context').use(webpack.ContextReplacementPlugin, [/moment[/\\]locale$/, /zh-cn/]); }
需要单独手动引用所需的语言包呀
刚尝试了,你的方法可以
我没实验,你试下可行?