Skip to content

Commit 5e9eced

Browse files
committed
feat: basic Vue 3 support
1 parent 933063f commit 5e9eced

55 files changed

Lines changed: 1408 additions & 909 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"scripts": {
1010
"dev": "cross-env PORT=8100 npm run dev:shell",
1111
"dev:shell": "cd packages/shell-dev && webpack-dev-server --inline --hot --no-info",
12+
"dev:shell-vue3": "concurrently \"cd packages/shell-dev-vue3 && yarn dev\" \"cd packages/shell-host && yarn dev\"",
1213
"dev:chrome": "cd packages/shell-chrome && webpack --watch --hide-modules",
1314
"dev:chrome:prod": "cd packages/shell-chrome && cross-env NODE_ENV=production webpack --watch --hide-modules",
1415
"lint": "eslint --ext=js,vue packages/app-backend/src packages/app-frontend/src packages/shared-utils/src packages/shell-chrome/src packages/shell-dev/src packages/shell-electron/src",
@@ -38,6 +39,7 @@
3839
"homepage": "https://github.com/vuejs/vue-devtools#readme",
3940
"devDependencies": {
4041
"autoprefixer": "^9.1.5",
42+
"concurrently": "^5.1.0",
4143
"cross-env": "^5.2.0",
4244
"cypress": "^3.1.0",
4345
"eslint": "^5.6.0",
@@ -50,12 +52,13 @@
5052
"eslint-plugin-vue": "^5.0.0-beta.3",
5153
"inquirer": "^6.2.0",
5254
"semver": "^5.5.1",
53-
"start-server-and-test": "^1.7.1"
55+
"start-server-and-test": "^1.7.1",
56+
"vue-loader": "^15.9.0"
5457
},
5558
"resolutions": {
5659
"cypress": "=3.4.1"
5760
},
5861
"engines": {
5962
"node": ">=8.10"
6063
}
61-
}
64+
}

packages/app-backend/src/events.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export function initEventsBackend (Vue, bridge) {
4242
}
4343
}
4444

45-
wrap('$emit')
46-
wrap('$broadcast')
47-
wrap('$dispatch')
45+
if (Vue) {
46+
wrap('$emit')
47+
wrap('$broadcast')
48+
wrap('$dispatch')
49+
}
4850
}

packages/app-backend/src/hook.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export function installHook (target) {
1717
const hook = {
1818
Vue: null,
1919

20+
apps: [],
21+
2022
_buffer: [],
2123

2224
_replayBuffer (event) {
@@ -96,6 +98,13 @@ export function installHook (target) {
9698
}
9799
})
98100

101+
hook.on('app:init', (app, version) => {
102+
hook.apps.push({
103+
app,
104+
version,
105+
})
106+
})
107+
99108
hook.once('vuex:init', store => {
100109
hook.store = store
101110
hook.initialState = clone(store.state)

0 commit comments

Comments
 (0)