Skip to content

Commit 4439d91

Browse files
authored
docs: cleanup changes (#8989)
1 parent e265e5c commit 4439d91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/plugin-vue/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export default {
110110

111111
```ts
112112
import vue from '@vitejs/plugin-vue'
113+
import yaml from 'js-yaml'
113114

114115
const vueI18nPlugin = {
115116
name: 'vue-i18n',
@@ -118,7 +119,7 @@ const vueI18nPlugin = {
118119
return
119120
}
120121
if (/\.ya?ml$/.test(id)) {
121-
code = JSON.stringify(require('js-yaml').load(code.trim()))
122+
code = JSON.stringify(yaml.load(code.trim()))
122123
}
123124
return `export default Comp => {
124125
Comp.i18n = ${code}

0 commit comments

Comments
 (0)