We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e265e5c commit 4439d91Copy full SHA for 4439d91
packages/plugin-vue/README.md
@@ -110,6 +110,7 @@ export default {
110
111
```ts
112
import vue from '@vitejs/plugin-vue'
113
+import yaml from 'js-yaml'
114
115
const vueI18nPlugin = {
116
name: 'vue-i18n',
@@ -118,7 +119,7 @@ const vueI18nPlugin = {
118
119
return
120
}
121
if (/\.ya?ml$/.test(id)) {
- code = JSON.stringify(require('js-yaml').load(code.trim()))
122
+ code = JSON.stringify(yaml.load(code.trim()))
123
124
return `export default Comp => {
125
Comp.i18n = ${code}
0 commit comments