Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch from vue-cli to vite #1000

Closed
Patchethium opened this issue Oct 30, 2022 · 3 comments · Fixed by #1207
Closed

switch from vue-cli to vite #1000

Patchethium opened this issue Oct 30, 2022 · 3 comments · Fixed by #1207

Comments

@Patchethium
Copy link
Contributor

Patchethium commented Oct 30, 2022

内容

I suggest we switch to vite for a faster and seamless DX. vite is a blazingly fast bundler which makes use of the ES module. Unlike webpack, vite doesn't load all the resources at startup, but only the essentials and load the rest on demand. As a result, its startup and HMR time are much shorter than webpack, which vue-cli is based on.

For anyone curious, you can create a electron-vite app to see how fast it can be

npm create @quick-start/electron
@Hiroshiba
Copy link
Member

Thanks for the suggestion!

The vite does indeed seem to work fast. Comfortable is a good thing.

I would like to carefully examine the possibility of switching to vite, as there is a risk of reducing maintainability when adopting a new technology.

At the moment, we are using webpack so we have a problem that electron serve is a little slow, but I am not motivated to migrate to vite aggressively.
However, there is no reason why we should not move to vite, so we will keep the issue open and await additional suggestions and results of trials.


提案ありがとうございます!

viteはたしかに動作が速そうです。快適なのは良いことだと思います。

新しい技術を取り入れるとメンテナンス性が下がるリスクがあるので、viteに移行できるのかを丁寧に吟味したいです。

いまのところ、webpackを用いているためelectron serveが少し遅いという課題はありますが、積極的にviteに移行するモチベーションはありません。
かといって移行してはいけない理由もないので、issueをopenにし続けて追加の提案や試した結果などをお待ちします。

@sousuke0422
Copy link
Contributor

vue-cli-plugin-viteなるものもあるらしいです。

@sevenc-nanashi
Copy link
Member

I made a prototype with vite: sevenc-nanashi/voicevox:poc/migrate-pnpm-vite
The startup time (between pnpm serve / npm run electron:serve and Starting 2 engine/s) has been x2.6 faster.


Viteで試作してみました:sevenc-nanashi/voicevox:poc/migrate-pnpm-vite
起動時間(pnpm serve / npm run electron:serve から Starting 2 engine/s まで)が2.6倍速くなりました。

@Hiroshiba Hiroshiba added 機能向上 要議論 実行する前に議論が必要そうなもの 優先度:低 labels Nov 5, 2022
@Hiroshiba Hiroshiba removed the 要議論 実行する前に議論が必要そうなもの label Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants