forked from jsnbuchanan/crowd-funder-for-time-pwa
migration: move to bash based build scripts
This commit is contained in:
@@ -15,19 +15,19 @@ export async function createBuildConfig(mode: string): Promise<UserConfig> {
|
||||
const appConfig = await loadAppConfig();
|
||||
const isElectron = mode === "electron";
|
||||
const isCapacitor = mode === "capacitor";
|
||||
const isPyWebView = mode === "pywebview";
|
||||
const isNative = isElectron || isCapacitor;
|
||||
|
||||
// Explicitly set platform and disable PWA for Electron
|
||||
process.env.VITE_PLATFORM = mode;
|
||||
process.env.VITE_PWA_ENABLED = isElectron ? 'false' : 'true';
|
||||
process.env.VITE_DISABLE_PWA = isElectron ? 'true' : 'false';
|
||||
|
||||
if (isElectron || isPyWebView || isCapacitor) {
|
||||
if (isElectron || isCapacitor) {
|
||||
process.env.VITE_PWA_ENABLED = 'false';
|
||||
}
|
||||
|
||||
return {
|
||||
base: isElectron || isPyWebView ? "./" : "/",
|
||||
base: isElectron ? "./" : "/",
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
port: parseInt(process.env.VITE_PORT || "8080"),
|
||||
|
||||
Reference in New Issue
Block a user