Skip to content

Commit d056075

Browse files
committed
chore: dev project test cdn
1 parent a492f14 commit d056075

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

dev/public/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<title>vue</title>
8+
<script src='https://cdnjs.cloudflare.com/ajax/libs/vConsole/3.9.1/vconsole.min.js'></script>
9+
<script src='https://cdn.jsdelivr.net/npm/vue-vconsole-devtools@1.0.5/dist/vue_plugin.js'></script>
810
</head>
911
<body>
1012
<div id="app"></div>
1113
<!-- built files will be auto injected -->
14+
<script>
15+
const vConsole = new window.VConsole();
16+
const Devtools = window.vueVconsoleDevtools;
17+
Devtools.initPlugin(vConsole);
18+
// window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit('init', Vue)
19+
// Vue.config.devtools = true;
20+
</script>
1221
</body>
1322
</html>

dev/src/main.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ new Vue({
88
render: (h) => h(App),
99
}).$mount("#app");
1010

11-
if(process.env.NODE_ENV === "development"){
12-
Promise.all([import("vconsole"), import("./debug/vue_plugin.js")]).then(
13-
(res) => {
14-
if (res.length === 2) {
15-
Vue.config.devtools = true;
16-
window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("init",Vue)
17-
const VConsole = res[0].default;
18-
const Devtools = res[1].default;
19-
Devtools.initPlugin(new VConsole());
20-
}
21-
}
22-
);
23-
}
11+
// if(process.env.NODE_ENV === "development"){
12+
// Promise.all([import("vconsole"), import("./debug/vue_plugin.js")]).then(
13+
// (res) => {
14+
// if (res.length === 2) {
15+
// Vue.config.devtools = true;
16+
// window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("init",Vue)
17+
// const VConsole = res[0].default;
18+
// const Devtools = res[1].default;
19+
// Devtools.initPlugin(new VConsole());
20+
// }
21+
// }
22+
// );
23+
// }

packages/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-vconsole-devtools",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "vConsole vue-devtools plugin. Debug vue anywhere",
55
"main": "./dist/vue_plugin.js",
66
"repository": {

0 commit comments

Comments
 (0)