一覧へ戻る
electron-vite/electron-vite-react(新しいタブで開きます)
主要言語: TypeScript
:electron: Electron + Vite + React + Sass boilerplate.
- star 数
- 2,436
- watcher 数
- 10
- fork 数
- 327
- issue 数
- 2
- 最終更新
- 2026/09/01
主要言語: TypeScript
:electron: Electron + Vite + React + Sass boilerplate.
English | 简体中文
# clone the project git clone https://github.com/electron-vite/electron-vite-react.git # enter the project directory cd electron-vite-react # install dependencies pnpm install # start development pnpm dev
pnpm dev: start the Vite dev server.pnpm build: build the renderer and package the app with electron-builder.pnpm preview: preview the production web build locally.pnpm test: run Vitest unit tests.pnpm test:e2e: build the test mode bundle and run Playwright tests.pnpm typecheck: run the TypeScript type checker.├── build/ Packaging assets
├── dist-electron/ Compiled Electron output
├── electron/ Main-process and preload source
│ ├── main/
│ └── preload/
├── public/ Static assets
├── src/ Renderer source code
│ ├── components/
│ │ └── update/
│ ├── demos/
│ └── type/
└── test/ Unit and end-to-end tests
└── e2e/
Files under electron/ are compiled into dist-electron/.
The renderer: {} preset in vite.config.ts is only a Vite adapter that polyfills Electron, Node.js APIs and native modules for the renderer process. It is not the same as enabling Node integration. If you want direct Node.js access in the renderer, enable nodeIntegration in the BrowserWindow webPreferences in the main process and review the security impact carefully.