It's a Vite plugin with integrated @doubleshot/builder. You can use it to help Vite quickly build node backend or electron's main process code.
Warning: this project is in early stage, do not use in production environment
npm i vite-plugin-doubleshot -D
# Or Yarn
yarn add vite-plugin-doubleshot -D
# Or PNPM
pnpm add vite-plugin-doubleshot -D
In Vite config file(eg. .vite.config.ts
), add this plugin:
import { defineConfig } from 'vite'
import { VitePluginDoubleshot } from 'vite-plugin-doubleshot'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
VitePluginDoubleshot({
type: 'electron',
main: 'dist/main/index.js',
entry: 'src/index.ts',
outDir: 'dist/main',
external: ['electron']
}),
]
})
You can find more configurations through the type definition file.
MIT License © 2022 Archer Gu