Import conf at build time

This commit is contained in:
aterox 2022-03-13 19:28:18 -04:00
parent f87e2fcd78
commit 38337ed693
No known key found for this signature in database
GPG Key ID: B54018AE10FB5593
1 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,8 @@ import ErrorHandler from '@/utils/ErrorHandler';
import { applyItemId } from '@/utils/SectionHelpers';
import $store from '@/store';
import buildConf from '../../public/conf.yml';
export default class ConfigAccumulator {
constructor() {
this.conf = $store.state.remoteConfig;
@ -25,7 +27,7 @@ export default class ConfigAccumulator {
appConfig() {
let appConfigFile = {};
// Set app config from file
if (this.conf) appConfigFile = this.conf.appConfig || {};
if (this.conf) appConfigFile = this.conf.appConfig || buildConf.appConfig || {};
// Fill in defaults if anything missing
let usersAppConfig = defaultAppConfig;
if (localStorage[localStorageKeys.APP_CONFIG]) {