ci010 / electron-vue-next

A starter template for using vue-next with the electron.
https://ci010.github.io/electron-vue-next/
191 stars 27 forks source link

为什么不适用webpack呢 #50

Closed 1923998238 closed 3 years ago

1923998238 commented 3 years ago

为什么不适用webpack而使用rollup呢?

ci010 commented 3 years ago

因为 vite 是基于 rollup 的,最后 build 也是用 rollup build 的。

当然因为 electron 分成 main 和 renderer,你如果想用 webpack 来 build main 也可以(renderer 依旧是 rollup,因为 vite 设计如此)。只不过加上 webpack 之后,你的 dependencies 会更乱……因为你现在有2个独立的 build 系统……