File size: 649 Bytes
4d70170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { SharedData, target } from '@vue-devtools/shared-utils'

export interface PageConfig {
  openInEditorHost?: string
  defaultSelectedAppId?: string
  customVue2ScanSelector?: string
}

let config: PageConfig = {}

export function getPageConfig(): PageConfig {
  return config
}

export function initOnPageConfig() {
  // User project devtools config
  if (Object.hasOwnProperty.call(target, 'VUE_DEVTOOLS_CONFIG')) {
    config = SharedData.pageConfig = target.VUE_DEVTOOLS_CONFIG

    // Open in editor
    if (Object.hasOwnProperty.call(config, 'openInEditorHost')) {
      SharedData.openInEditorHost = config.openInEditorHost
    }
  }
}