11import { VERSION } from '@ember/version' ;
2- import Adapters from './adapters' ;
3- import MainModule from './main' ;
2+ import type Adapters from './adapters' ;
43import { guidFor } from '@ember/object/internals' ;
54import { A } from '@ember/array' ;
65import Namespace from '@ember/application/namespace' ;
@@ -15,14 +14,15 @@ export function setupEmberInspectorSupport() {
1514 window . addEventListener ( 'ember-inspector-loaded' as any , ( event : CustomEvent ) => {
1615 const adapter = event . detail . adapter ;
1716 const EMBER_VERSIONS_SUPPORTED = event . detail . EMBER_VERSIONS_SUPPORTED ;
18- loadEmberDebug ( adapter , EMBER_VERSIONS_SUPPORTED ) ;
17+ void loadEmberDebug ( adapter , EMBER_VERSIONS_SUPPORTED ) ;
1918 } ) ;
2019
2120 const e = new Event ( 'ember-inspector-support-setup' ) ;
2221 window . dispatchEvent ( e ) ;
2322}
2423
25- function loadEmberDebug (
24+ // eslint-disable-next-line disable-features/disable-async-await
25+ async function loadEmberDebug (
2626 adapter : keyof typeof Adapters ,
2727 EMBER_VERSIONS_SUPPORTED : [ string , string ]
2828) {
@@ -32,6 +32,11 @@ function loadEmberDebug(
3232 return ;
3333 }
3434
35+ // @ts -ignore
36+ const Adapters = await import ( './adapters' ) ;
37+ // @ts -ignore
38+ const MainModule = await import ( './main' ) ;
39+
3540 if ( ! versionTest ( VERSION , EMBER_VERSIONS_SUPPORTED ) ) {
3641 // Wrong inspector version. Redirect to the correct version.
3742 sendVersionMiss ( ) ;
0 commit comments