11 changed files with 89 additions and 140 deletions
@ -1,9 +1,9 @@ |
|||||
# Only the variables that start with VITE_ are seen in the application import.meta.env in Vue. |
# Only the variables that start with VITE_ are seen in the application import.meta.env in Vue. |
||||
|
|
||||
# iOS doesn't like spaces in the app title. |
|
||||
TIME_SAFARI_APP_TITLE="TimeSafari_Test" |
TIME_SAFARI_APP_TITLE="TimeSafari_Test" |
||||
VITE_APP_SERVER=https://test.timesafari.app |
VITE_APP_SERVER=https://test.timesafari.app |
||||
# This is the claim ID for actions in the BVC project, with the JWT ID on this environment (not production). |
# This is the claim ID for actions in the BVC project. |
||||
VITE_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HWE8FWHQ1YGP7GFZYYPS272F |
VITE_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HWE8FWHQ1YGP7GFZYYPS272F |
||||
VITE_DEFAULT_ENDORSER_API_SERVER=https://test-api.endorser.ch |
VITE_DEFAULT_ENDORSER_API_SERVER=https://test-api.endorser.ch |
||||
|
|
@ -1,55 +0,0 @@ |
|||||
import * as path from "path"; |
|
||||
import { promises as fs } from "fs"; |
|
||||
import { fileURLToPath } from "url"; |
|
||||
|
|
||||
export async function loadAppConfig() { |
|
||||
const packageJson = await loadPackageJson(); |
|
||||
const appName = process.env.TIME_SAFARI_APP_TITLE || packageJson.name; |
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); |
|
||||
|
|
||||
return { |
|
||||
pwaConfig: { |
|
||||
manifest: { |
|
||||
name: appName, |
|
||||
short_name: appName, |
|
||||
icons: [ |
|
||||
{ |
|
||||
src: "./img/icons/android-chrome-192x192.png", |
|
||||
sizes: "192x192", |
|
||||
type: "image/png", |
|
||||
}, |
|
||||
{ |
|
||||
src: "./img/icons/android-chrome-512x512.png", |
|
||||
sizes: "512x512", |
|
||||
type: "image/png", |
|
||||
}, |
|
||||
{ |
|
||||
src: "./img/icons/android-chrome-maskable-192x192.png", |
|
||||
sizes: "192x192", |
|
||||
type: "image/png", |
|
||||
purpose: "maskable", |
|
||||
}, |
|
||||
{ |
|
||||
src: "./img/icons/android-chrome-maskable-512x512.png", |
|
||||
sizes: "512x512", |
|
||||
type: "image/png", |
|
||||
purpose: "maskable", |
|
||||
}, |
|
||||
], |
|
||||
}, |
|
||||
}, |
|
||||
aliasConfig: { |
|
||||
"@": path.resolve(path.dirname(__dirname), "src"), |
|
||||
buffer: path.resolve(path.dirname(__dirname), "node_modules", "buffer"), |
|
||||
"dexie-export-import/dist/import": |
|
||||
"dexie-export-import/dist/import/index.js", |
|
||||
}, |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
async function loadPackageJson() { |
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); |
|
||||
const packageJsonPath = path.resolve(path.dirname(__dirname), "package.json"); |
|
||||
const packageJsonData = await fs.readFile(packageJsonPath, "utf-8"); |
|
||||
return JSON.parse(packageJsonData); |
|
||||
} |
|
Loading…
Reference in new issue