Skip to content

Commit 50d4539

Browse files
committed
make example build work
1 parent 08dfbaf commit 50d4539

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"vitepress": "^0.17.3"
1010
},
1111
"dependencies": {
12-
"@vue/repl": "^0.2.3",
12+
"@vue/repl": "^0.2.4",
1313
"@vue/theme": "^0.1.5"
1414
}
1515
}

src/.vitepress/config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ module.exports = {
447447
vite: {
448448
optimizeDeps: {
449449
exclude: ['@vue/repl']
450+
},
451+
ssr: {
452+
external: ['@vue/repl']
450453
}
451454
},
452455

src/examples/index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ aside: false
33
page: true
44
---
55

6-
<script setup>
7-
import Examples from './Examples.vue'
6+
<script>
7+
import { defineAsyncComponent } from 'vue'
8+
9+
export default {
10+
components: {
11+
Examples: defineAsyncComponent(() => import('./Examples.vue'))
12+
}
13+
}
814
</script>
915

1016
<ClientOnly>

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@
291291
estree-walker "^2.0.2"
292292
magic-string "^0.25.7"
293293

294-
"@vue/repl@^0.2.3":
295-
version "0.2.3"
296-
resolved "https://registry.yarnpkg.com/@vue/repl/-/repl-0.2.3.tgz#af71ed98dbccd6bd6a0b89a4644be4e402a9647e"
297-
integrity sha512-J30cpBXMkRdgkGTerOURLb+tHceThwdzlK5mYXuZ4QFGQh9TP2/G0qTZIP7kW86CXDXQrJ+i22Pqaa1JBTHmMQ==
294+
"@vue/repl@^0.2.4":
295+
version "0.2.4"
296+
resolved "https://registry.yarnpkg.com/@vue/repl/-/repl-0.2.4.tgz#2d97a2b804fa1b96360fa9ff85ad284838cfc19c"
297+
integrity sha512-Vo45lseAJeb4+tJRCdG3vOxu5dA7/aKL7xxLGOp5lmD0dPm0l0VvJ9koZW8OEkRLrKFFv8x6y7tvqOLffAYL+w==
298298

299299
300300
version "3.2.11"

0 commit comments

Comments
 (0)