Vite

Create a new Electron app with Vite.使用Vite创建一个新的Electron应用程序。

To get you up and running as fast as possible with Vite, we provide a template that makes use of the @electron-forge/plugin-vite module, plus some preset Vite configuration options.为了让您使用Vite尽可能快地启动和运行,我们提供了一个使用@electron-forge/plugin-vite模块的模板,以及一些预设的Vite配置选项。

npm init electron-app@latest my-new-app -- --template=vite

Once you've initialized the template, you'll need to run npm start in the generated directory.初始化模板后,需要在生成的目录中运行npm start

See the Vite Plugin documentation for Electron Forge-specific configuration options.有关Electron Forge特定配置选项,请参阅Vite插件文档。