Skip to content

Commit

Permalink
docs: cleanup changes (#8989)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Jul 8, 2022
1 parent e265e5c commit 4439d91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/plugin-vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export default {

```ts
import vue from '@vitejs/plugin-vue'
import yaml from 'js-yaml'

const vueI18nPlugin = {
name: 'vue-i18n',
Expand All @@ -118,7 +119,7 @@ const vueI18nPlugin = {
return
}
if (/\.ya?ml$/.test(id)) {
code = JSON.stringify(require('js-yaml').load(code.trim()))
code = JSON.stringify(yaml.load(code.trim()))
}
return `export default Comp => {
Comp.i18n = ${code}
Expand Down

0 comments on commit 4439d91

Please sign in to comment.