rollup 插件 @rollup/plugin-node-resolve 的作用
比较
// 不配置 @rollup/plugin-node-resolve 插件引入方式
export foo from './foo/index.js'
import bar from './bar/index.js'
// 配置了 @rollup/plugin-node-resolve 插件引入方式
export foo from './foo'
import bar from './bar'
可以看出不配置的话引入路径必须是完整的。
参考
https://rollupjs.org/guide/en/#external
https://github.com/rollup/plugins/tree/master/packages/node-resolve