File size: 401 Bytes
4d70170 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import { initBackend } from '@back'
import { Bridge } from '@vue-devtools/shared-utils'
const bridge = new Bridge({
listen(fn) {
window.addEventListener('message', evt => fn(evt.data))
},
send(data) {
if (process.env.NODE_ENV !== 'production') {
console.log('%cbackend -> devtools', 'color:#888;', data)
}
window.parent.postMessage(data, '*')
},
})
initBackend(bridge)
|