import 'bootstrap' ; import '@monosample/core-ui' ; import { Aurelia , PLATFORM } from 'aurelia-framework' ; import { HttpClient , HttpClientConfiguration } from 'aurelia-fetch-client' ; import { bearerTokenInterceptor } from './interceptors' ; import * as environment from '../config/environment.json' ; export function configure ( aurelia ) { aurelia . use . standardConfiguration ( ) . feature ( PLATFORM . moduleName ( 'resources/index' ) ) ; const container = aurelia . container ; const http = new HttpClient ( ) ; http . configure ( ( config ) => { config . useStandardConfiguration ( ) . withBaseUrl ( environment . baseUrl ) . withInterceptor ( bearerTokenInterceptor ) ; } ) ; container . registerInstance ( HttpClient , http ) ; aurelia . use . developmentLogging ( environment . debug ? 'debug' : 'warn' ) ; if ( environment . testing ) { aurelia . use . plugin ( PLATFORM . moduleName ( 'aurelia-testing' ) ) ; } aurelia . start ( ) . then ( ( ) => aurelia . setRoot ( PLATFORM . moduleName ( 'app' ) ) ) ; }