reinit
This commit is contained in:
50
electron.vite.config.ts
Normal file
50
electron.vite.config.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'electron-vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
|
||||
import svgLoader from 'vite-svg-loader'
|
||||
|
||||
export default defineConfig({
|
||||
main: {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@my-type': resolve('src/my-type')
|
||||
}
|
||||
}
|
||||
},
|
||||
preload: {},
|
||||
renderer: {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@renderer': resolve('src/renderer/src'),
|
||||
'@my-type': resolve('src/my-type')
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
Components({
|
||||
resolvers: [NaiveUiResolver()],
|
||||
dts: true
|
||||
}),
|
||||
svgLoader({
|
||||
svgoConfig: {
|
||||
plugins: [
|
||||
{
|
||||
name: 'removeAttrs',
|
||||
params: {
|
||||
attrs: ['width', 'height']
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'prefixIds',
|
||||
params: {
|
||||
prefix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user