add @rollup/plugin-commonjs to esm & cjs
当导出为 esm 或 cjs 时,如果依赖的库里有 commonjs 模块会报错,如很多库都依赖 @babel/runtime 而里面很多都是 commonjs 的,报错如下:
Error: 'default' is not exported by node_modules/@babel/runtime/helpers/defineProperty.js, imported by ...
esm 和 cjs 有依赖安装时机,应该优先对依赖做 external 处理?refer: https://github.com/umijs/father#%E5%85%B3%E4%BA%8E-dependenciespeerdependencies-%E5%92%8C-external
esm 和 cjs 有依赖安装时机,应该优先对依赖做 external 处理?refer: https://github.com/umijs/father#%E5%85%B3%E4%BA%8E-dependenciespeerdependencies-%E5%92%8C-external
但如果想把依赖一同打包进来就不行了。
error Error: 'default' is not exported by ../../node_modules/@babel/runtime/helpers/typeof.js, imported by ../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js 我也出现了这个问题,想问一下.fatherrc里如何配置@rollup/plugin-commonjs 插件
感谢贡献,father 4 已发布,旧版本不再迭代,PR closed