let inDemoMode = false ; export function isDemoMode ( ) { return inDemoMode ; } export function mocksInit ( ) { if ( process . env . BUILD_TARGET && process . env . BUILD_TARGET === 'DEMO' ) { console . log ( '!!!!!!!!!!!!!!!!!!! This is a DEMO !!!!!!!!!!!!!!!!!!!' ) ; console . log ( '------------------------------------------------------' ) ; console . log ( 'There will be no write interactions with the real API' ) ; console . log ( 'We will add a the https://github.com/mswjs/msw module' ) ; console . log ( 'To catch these' ) ; import ( './browser' ) . then ( module => { console . log ( 'starting worker' ) ; module . worker . start ( ) ; inDemoMode = true ; return ; } ) . catch ( console . error ) ; } } mocksInit ( ) ;