mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-12-18 18:35:55 +01:00
53 lines
1.1 KiB
JavaScript
53 lines
1.1 KiB
JavaScript
import { resolve } from 'node:path'
|
|
import { defineConfig, mergeConfig } from 'vite'
|
|
import useElectron from 'vite-plugin-electron'
|
|
import useRenderer from 'vite-plugin-electron-renderer'
|
|
|
|
import useVue from '@vitejs/plugin-vue'
|
|
import useEslint from 'vite-plugin-eslint'
|
|
import useUnoCSS from 'unocss/vite'
|
|
import usePath from '@viarotel-org/vite-plugin-path'
|
|
|
|
const merge = config =>
|
|
mergeConfig(
|
|
{
|
|
resolve: {
|
|
alias: {
|
|
'@root': resolve('./'),
|
|
'@resources': resolve('./electron/resources'),
|
|
},
|
|
},
|
|
plugins: [usePath()],
|
|
},
|
|
config,
|
|
)
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
assetsInclude: ['**/*.exe'],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve('./src'),
|
|
},
|
|
},
|
|
plugins: [
|
|
useEslint(),
|
|
useUnoCSS(),
|
|
useVue(),
|
|
useElectron([
|
|
{
|
|
entry: 'electron/main.js',
|
|
vite: merge({}),
|
|
},
|
|
{
|
|
entry: 'electron/preload.js',
|
|
onstart(args) {
|
|
args.reload()
|
|
},
|
|
vite: merge({}),
|
|
},
|
|
]),
|
|
useRenderer(),
|
|
],
|
|
})
|