Skip to content

Commit 17db6aa

Browse files
committedDec 17, 2024·
demo: update [email protected]
1 parent 07e1fc4 commit 17db6aa

File tree

4 files changed

+250
-16
lines changed

4 files changed

+250
-16
lines changed
 

‎demos/vue3-demo/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"ezuikit-js": "^8.1.1",
13-
"vue": "^3.2.41"
12+
"ezuikit-js": "^8.1.2",
13+
"vue": "^3.2.41",
14+
"terser": "^5.36.0"
1415
},
1516
"devDependencies": {
1617
"@vitejs/plugin-vue": "^3.2.0",

‎demos/vue3-demo/pnpm-lock.yaml

+226-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎demos/vue3-demo/src/components/Player.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ const init = () => {
125125
// https://open.ys7.com/help/1772?h=domain
126126
// domain默认是 https://open.ys7.com, 如果是私有化部署或海外的环境,请配置对应的domain
127127
// The default domain is https://open.ys7.com If it is a private deployment or overseas (outside of China) environment, please configure the corresponding domain
128-
domain: "https://open.ys7.com"
129-
}
128+
domain: "https://open.ys7.com",
129+
},
130130
});
131131
window.player = player;
132132
// });
@@ -139,7 +139,9 @@ onMounted(() => {
139139

140140
<template>
141141
<div class="hello-ezuikit-js">
142-
<div id="video-container" style="width: 600px; height: 400px"></div>
142+
<div>
143+
<div id="video-container" style="width: 600px; height: 400px"></div>
144+
</div>
143145
<div>
144146
<button @click="init">init</button>
145147
<button @click="stop">stop</button>

‎demos/vue3-demo/vite.config.ts

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
import { defineConfig } from 'vite'
2-
import vue from '@vitejs/plugin-vue'
1+
import { defineConfig } from "vite";
2+
import vue from "@vitejs/plugin-vue";
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
6-
plugins: [vue()]
7-
})
6+
build: {
7+
minify: "terser",
8+
terserOptions: {
9+
// 清除console和debugger
10+
compress: {
11+
// drop_console 暂时不能用,会报错
12+
// https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/138
13+
drop_console: true,
14+
drop_debugger: true,
15+
},
16+
},
17+
},
18+
plugins: [vue()],
19+
});

0 commit comments

Comments
 (0)
Please sign in to comment.