mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 11:21:46 +00:00
fix: electron-vite setting
Co-authored-by: Su-Yong <simssy2205@gmail.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
import { defineConfig, defineViteConfig } from 'electron-vite';
|
||||
import builtinModules from 'builtin-modules';
|
||||
@ -10,6 +10,11 @@ import pluginLoader from './vite-plugins/plugin-loader';
|
||||
|
||||
import type { UserConfig } from 'vite';
|
||||
|
||||
const resolveAlias = {
|
||||
'@': resolve(__dirname, './src'),
|
||||
'@assets': resolve(__dirname, './assets'),
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
main: defineViteConfig(({ mode }) => {
|
||||
const commonConfig: UserConfig = {
|
||||
@ -35,10 +40,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@assets': fileURLToPath(new URL('./assets', import.meta.url)),
|
||||
},
|
||||
alias: resolveAlias,
|
||||
},
|
||||
};
|
||||
|
||||
@ -81,10 +83,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@assets': fileURLToPath(new URL('./assets', import.meta.url)),
|
||||
},
|
||||
alias: resolveAlias,
|
||||
},
|
||||
};
|
||||
|
||||
@ -129,10 +128,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@assets': fileURLToPath(new URL('./assets', import.meta.url)),
|
||||
},
|
||||
alias: resolveAlias,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user