File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,22 @@ Vue.config.productionTip = false;
1717Vue . use ( http ) ;
1818Vue . use ( errorMessenger ) ;
1919
20- new Vue ( {
21- router,
22- store,
23- render : ( h ) => h ( App ) ,
24- } ) . $mount ( '#app' ) ;
20+ function envHasNecessaryVariables ( ) {
21+ return ! ( ! process . env . VUE_APP_BACKEND_BASE_URL
22+ || ! process . env . VUE_APP_ACCESS_TOKEN
23+ || ! process . env . VUE_APP_REFRESH_TOKEN
24+ || ! process . env . VUE_APP_VUEX_PERSISTED_STATE
25+ || ! process . env . VUE_APP_SECURE_LS_METADATA ) ;
26+ }
27+
28+ if ( envHasNecessaryVariables ( ) ) {
29+ new Vue ( {
30+ router,
31+ store,
32+ render : ( h ) => h ( App ) ,
33+ } ) . $mount ( '#app' ) ;
34+ } else {
35+ console . log ( 'Environment variables missing. Please, set VUE_APP_BACKEND_BASE_URL,'
36+ + 'VUE_APP_ACCESS_TOKEN, VUE_APP_REFRESH_TOKEN, VUE_APP_VUEX_PERSISTED_STATE,'
37+ + 'VUE_APP_SECURE_LS_METADATA variables in .env file of frontend folder' ) ;
38+ }
You can’t perform that action at this time.
0 commit comments