$ npm i egg-proxy-npm --save
// {app_root}/config/plugin.js
exports.proxyNpm = {
enable: true,
package: 'egg-proxy-npm',
};
// {app_root}/config/config.default.js
exports.proxyNpm = {
baseDir: path.join(appInfo.baseDir, 'node_modules'), // 配置文件具体存放地址, 默认node_modules 目录
cacheControl: `public, max-age=${6000 * 24 * 60 * 60 * 1000}`,
};
see config/config.default.js for more detail.
Please open an issue here.