{"_id":"@byc/electron-vite-plus","_rev":"2-8b5ccfad48d6626c46bb015c433aa838","name":"@byc/electron-vite-plus","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@byc/electron-vite-plus","version":"0.0.1","keywords":["electron","vite","cli","plugin"],"author":{"name":"Alex Wei","email":"https://github.com/alex8088"},"license":"MIT","_id":"@byc/electron-vite-plus@0.0.1","maintainers":[{"name":"byc","email":"bycrxemail@gmail.com"}],"homepage":"https://electron-vite.org","bugs":{"url":"https://github.com/alex8088/electron-vite/issues"},"bin":{"electron-vite":"bin/electron-vite.js"},"dist":{"shasum":"4135e41ce883c8fbc979c46b5d22b9d7100912c4","tarball":"https://registry.npmjs.org/@byc/electron-vite-plus/-/electron-vite-plus-0.0.1.tgz","fileCount":13,"integrity":"sha512-EmxhoQuxTqZl3uFvidEMUoI5yW1fdnpwTT09GiylmsW+LDmtxD1O8aZGimahO2Qr2aQ9UIQlOyA0Z9rPpaZhxA==","signatures":[{"sig":"MEQCIF4yZaWYZMFQrtQOx8zFwXzKHfBqstv5tC6RHrAGJoX+AiBomQT4LuQh4gGxfmLIv13sKNQTonbgXv7XH4CqSWFkGg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":111732},"main":"./dist/index.js","pnpm":{"onlyBuiltDependencies":["@swc/core","esbuild","simple-git-hooks"]},"type":"module","types":"./dist/index.d.ts","engines":{"node":"^20.19.0 || >=22.12.0"},"exports":{".":"./dist/index.js","./node":{"types":"./node.d.ts"},"./package.json":"./package.json"},"gitHead":"b85bc0ed5c44626ddd3cde93c2b10781fe1b546f","scripts":{"lint":"eslint --cache .","build":"pnpm run lint && rollup -c rollup.config.ts --configPlugin typescript","format":"prettier --write .","typecheck":"tsc --noEmit"},"_npmUser":{"name":"byc","email":"bycrxemail@gmail.com"},"repository":{"url":"git+https://github.com/alex8088/electron-vite.git","type":"git"},"_npmVersion":"11.7.0","description":"Electron build tooling based on Vite","directories":{},"lint-staged":{"*.js":["prettier --write"],"*.ts?(x)":["eslint","prettier --parser=typescript --write"]},"_nodeVersion":"24.11.1","dependencies":{"cac":"^7.0.0","esbuild":"^0.25.11","picocolors":"^1.1.1","@babel/core":"^7.29.0","magic-string":"^0.30.21","@babel/plugin-transform-arrow-functions":"^7.27.1"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.12.4","devDependencies":{"vite":"^8.0.3","tslib":"^2.8.1","eslint":"^10.1.0","rollup":"^4.60.0","globals":"^17.4.0","prettier":"^3.8.1","@swc/core":"^1.15.21","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^22.19.15","lint-staged":"^16.4.0","rollup-plugin-rm":"^1.0.2","simple-git-hooks":"^2.13.1","rollup-plugin-dts":"^6.4.1","typescript-eslint":"^8.57.2","@types/babel__core":"^7.20.5","@rollup/plugin-json":"^6.1.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3"},"peerDependencies":{"vite":"^6.0.0 || ^7.0.0 || ^8.0.0","@swc/core":"^1.0.0"},"simple-git-hooks":{"commit-msg":"node scripts/verifyCommit.js $1","pre-commit":"npx lint-staged"},"peerDependenciesMeta":{"@swc/core":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/electron-vite-plus_0.0.1_1788623688577_0.5031582830120753","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@byc/electron-vite-plus","version":"0.0.2","description":"Electron build tooling based on Vite","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":"./dist/index.js","./node":{"types":"./node.d.ts"},"./package.json":"./package.json"},"bin":{"electron-vite-plus":"bin/electron-vite.js","evp":"bin/electron-vite.js"},"engines":{"node":"^20.19.0 || >=22.12.0"},"packageManager":"pnpm@10.12.4","author":{"name":"Alex Wei","email":"https://github.com/alex8088"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alex8088/electron-vite.git"},"bugs":{"url":"https://github.com/alex8088/electron-vite/issues"},"homepage":"https://electron-vite.org","keywords":["electron","vite","cli","plugin"],"scripts":{"format":"prettier --write .","lint":"eslint --cache .","typecheck":"tsc --noEmit","build":"pnpm run lint && rollup -c rollup.config.ts --configPlugin typescript"},"simple-git-hooks":{"pre-commit":"npx lint-staged","commit-msg":"node scripts/verifyCommit.js $1"},"lint-staged":{"*.js":["prettier --write"],"*.ts?(x)":["eslint","prettier --parser=typescript --write"]},"peerDependencies":{"@swc/core":"^1.0.0","vite":"^6.0.0 || ^7.0.0 || ^8.0.0"},"peerDependenciesMeta":{"@swc/core":{"optional":true}},"devDependencies":{"@eslint/js":"^10.0.1","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^16.0.3","@rollup/plugin-typescript":"^12.3.0","@swc/core":"^1.15.21","@types/babel__core":"^7.20.5","@types/node":"^22.19.15","eslint":"^10.1.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","globals":"^17.4.0","lint-staged":"^16.4.0","prettier":"^3.8.1","rollup":"^4.60.0","rollup-plugin-dts":"^6.4.1","rollup-plugin-rm":"^1.0.2","simple-git-hooks":"^2.13.1","tslib":"^2.8.1","typescript":"^5.9.3","typescript-eslint":"^8.57.2","vite":"^8.0.3"},"dependencies":{"@babel/core":"^7.29.0","@babel/plugin-transform-arrow-functions":"^7.27.1","cac":"^7.0.0","esbuild":"^0.25.11","magic-string":"^0.30.21","picocolors":"^1.1.1"},"pnpm":{"onlyBuiltDependencies":["@swc/core","esbuild","simple-git-hooks"]},"gitHead":"70ecce797cf1d5dbb1246323c1e0ff53a3fab23c","_id":"@byc/electron-vite-plus@0.0.2","_nodeVersion":"24.11.1","_npmVersion":"11.7.0","dist":{"integrity":"sha512-Ky+s3tvUMGJ7XcfdCkdBmMeVtKAuq9EESffW6dDUxx/cOSi3ivM6RD9YIzSnUGWCifuGkCqJ855FZ1OPMO+ADA==","shasum":"9176f14fbbb0983ee96463e639a08e978d5d6a97","tarball":"https://registry.npmjs.org/@byc/electron-vite-plus/-/electron-vite-plus-0.0.2.tgz","fileCount":13,"unpackedSize":111772,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDQAcJL1hhMKosW0CyWayjLXyFIGa1Oo2CQNn+jk8OArAiAX3miSQX3HM5B7G3kTC0KymBhcaXKcCtMwbwsg6NX2zQ=="}]},"_npmUser":{"name":"byc","email":"bycrxemail@gmail.com"},"directories":{},"maintainers":[{"name":"byc","email":"bycrxemail@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/electron-vite-plus_0.0.2_1788623932563_0.34466776793812914"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-05T15:54:48.395Z","modified":"2026-09-05T15:58:52.832Z","0.0.1":"2026-09-05T15:54:48.733Z","0.0.2":"2026-09-05T15:58:52.698Z"},"bugs":{"url":"https://github.com/alex8088/electron-vite/issues"},"author":{"name":"Alex Wei","email":"https://github.com/alex8088"},"license":"MIT","homepage":"https://electron-vite.org","keywords":["electron","vite","cli","plugin"],"repository":{"type":"git","url":"git+https://github.com/alex8088/electron-vite.git"},"description":"Electron build tooling based on Vite","maintainers":[{"name":"byc","email":"bycrxemail@gmail.com"}],"readme":"<p align=\"center\">\n  <img src=\"https://alex8088.github.io/assets/electron-vite.svg\" width=\"150px\" height=\"150px\">\n</p>\n\n<div align=\"center\">\n  <h1>electron-vite</h1>\n</div>\n<p align=\"center\">Next generation Electron build tooling based on Vite</p>\n\n<p align=\"center\">\n<img src=\"https://img.shields.io/npm/v/electron-vite?color=6988e6&label=version\">\n<img src=\"https://img.shields.io/github/license/alex8088/electron-vite?color=blue\" alt=\"license\" />\n</p>\n\n<p align=\"center\">\n<a href=\"https://electron-vite.org\">Documentation</a> |\n<a href=\"https://electron-vite.org/guide\">Getting Started</a> |\n<a href=\"https://github.com/alex8088/quick-start/tree/master/packages/create-electron\">create-electron</a>\n</p>\n\n<p align=\"center\">\n<a href=\"https://cn.electron-vite.org\">中文文档</a>\n</p>\n\n<br />\n<br />\n\n## About This Fork\n\nThis repository is a fork of [alex8088/electron-vite](https://github.com/alex8088/electron-vite) focused on Vite+ integration while staying close to upstream.\n\nAdditions in this fork:\n\n- Load Electron targets from a unified Vite+ `vite.config.ts`.\n- Share Vite+ resolve options, including `tsconfigPaths`, across main, preload and renderer.\n- Provide Vite's interactive development shortcuts with coordinated Electron restart and shutdown.\n- Forward browser errors and warning/error console output to the development terminal by default.\n\n## Features\n\n- ⚡️ [Vite](https://vitejs.dev) powered and use the same way.\n- 🛠 Pre-configure with sensible defaults optimized for Electron.\n- 💡 Optimize asset handling for Electron main process.\n- 🚀 Fast HMR & hot reloading.\n- 🔥 Isolated build for multi-entry application development.\n- ✨ Simplify multi-threading development.\n- 🔒 Compile code to v8 bytecode to protect source code.\n- 🔌 Easy to debug in IDEs such as VSCode or WebStorm.\n- 📦 Out-of-the-box support for TypeScript, Vue, React, Svelte, SolidJS and more.\n\n## Usage\n\n### Install\n\n```sh\nnpm i electron-vite -D\n```\n\n### Development & Build\n\nIn a project where `electron-vite` is installed, you can use `electron-vite` binary directly with `npx electron-vite` or add the npm scripts to your `package.json` file like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"electron-vite preview\",\n    \"dev\": \"electron-vite dev\",\n    \"prebuild\": \"electron-vite build\"\n  }\n}\n```\n\n### Configuration\n\nWhen running `electron-vite` from the command line, electron-vite will automatically try to resolve `electron.vite.config.*` or `vite.config.*` inside the project root. When both exist, `electron.vite.config.*` takes precedence.\n\nVite+ projects can keep the Electron targets and shared resolve options in a single `vite.config.ts`. The shared `resolve` options are applied to main, preload and renderer; options declared by an individual target take precedence.\n\n```ts\n// vite.config.ts\nimport { defineConfig } from 'electron-vite'\n\nexport default defineConfig({\n  resolve: {\n    tsconfigPaths: true,\n    alias: {\n      '@': './src'\n    }\n  },\n  main: {},\n  preload: {},\n  renderer: {}\n})\n```\n\nDuring development, the renderer server enables Vite's interactive CLI shortcuts. Press `h + enter` to list them. Restarting with `r` restarts both the Vite server and the Electron app, while `q` closes both processes.\n\nBrowser runtime errors and `console.warn` / `console.error` calls are forwarded to the terminal by default through Vite's `server.forwardConsole`. You can disable or customize it in the renderer config:\n\n```ts\nexport default defineConfig({\n  main: {},\n  preload: {},\n  renderer: {\n    server: {\n      forwardConsole: {\n        unhandledErrors: true,\n        logLevels: ['warn', 'error']\n      }\n    }\n  }\n})\n```\n\n### Getting Started\n\nClone the [electron-vite-boilerplate](https://github.com/alex8088/electron-vite-boilerplate) or use the [create-electron](https://github.com/alex8088/quick-start/tree/master/packages/create-electron) tool to scaffold your project.\n\n```bash\nnpm create @quick-start/electron@latest\n```\n\nCurrently supported template presets include:\n\n|                                                 JavaScript                                                 |                                                    TypeScript                                                    |\n| :--------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: |\n| [vanilla](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/vanilla) | [vanilla-ts](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/vanilla-ts) |\n|     [vue](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/vue)     |     [vue-ts](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/vue-ts)     |\n|   [react](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/react)   |   [react-ts](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/react-ts)   |\n|  [svelte](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/svelte)  |  [svelte-ts](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/svelte-ts)  |\n|   [solid](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/solid)   |   [solid-ts](https://github.com/alex8088/quick-start/tree/master/packages/create-electron/playground/solid-ts)   |\n\n## Contribution\n\nSee [Contributing Guide](CONTRIBUTING.md).\n\n## License\n\n[MIT](./LICENSE) © alex.wei\n","readmeFilename":"README.md"}