File tree Expand file tree Collapse file tree
packages/app-backend-core/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,5 +101,19 @@ module.exports = {
101101 'no-console' : 'off' ,
102102 } ,
103103 } ,
104+ {
105+ files : [
106+ 'packages/app-backend-core/src/hook.ts' ,
107+ ] ,
108+ rules : {
109+ 'no-restricted-syntax' : [ 'error' , {
110+ selector : 'ImportDeclaration' ,
111+ message : 'File is injected with a `Function.toString()`, imports will not work' ,
112+ } , {
113+ selector : `CallExpression[callee.name='require']` ,
114+ message : 'File is injected with a `Function.toString()`, require will not work' ,
115+ } ] ,
116+ } ,
117+ } ,
104118 ] ,
105119}
Original file line number Diff line number Diff line change 11// this script is injected into every page.
2- import { isBrowser , target } from '@vue-devtools/shared-utils'
32
43/**
54 * Install the hook on window, which is an event emitter.
@@ -37,7 +36,7 @@ export function installHook (target, isIframe = false) {
3736
3837 let iframeChecks = 0
3938 function injectToIframes ( ) {
40- if ( ! isBrowser ) return
39+ if ( typeof window === 'undefined' ) return
4140
4241 const iframes = document . querySelectorAll < HTMLIFrameElement > ( 'iframe:not([data-vue-devtools-ignore])' )
4342 for ( const iframe of iframes ) {
You can’t perform that action at this time.
0 commit comments