forked from OctoWoW/OctoLauncher
OctoLauncher 1.3.1
Manifest-based CDN updater and mod manager for the OctoWoW 1.12.1 client: launcher-owned realmlist, torrent-backed content sync with bundled aria2c, antivirus and Defender exclusion handling, hardware-aware render distance, optional client tweaks and mods, and the in-launcher news feed.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { resolve } from 'path';
|
||||
|
||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { loadEnv } from 'vite';
|
||||
|
||||
const alias = {
|
||||
'~common': resolve('src/common'),
|
||||
'~main': resolve('src/main'),
|
||||
'~renderer': resolve('src/renderer'),
|
||||
'~build': resolve('build')
|
||||
};
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
if (mode === 'ptr') {
|
||||
const realm = loadEnv(mode, process.cwd(), 'MAIN_VITE_')
|
||||
.MAIN_VITE_PTR_REALMLIST;
|
||||
if (!realm || realm === 'octowow.st')
|
||||
throw new Error(
|
||||
'PTR build needs MAIN_VITE_PTR_REALMLIST set to a non-prod realm host'
|
||||
);
|
||||
}
|
||||
return {
|
||||
main: {
|
||||
resolve: { alias },
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
preload: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
renderer: {
|
||||
resolve: { alias },
|
||||
plugins: [react()]
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user