近期在使用 Vue-i18N 時,會在 VS Code 內看見 ‘__VLS_ctx.$t’ is of type ‘unknown’ 錯誤。這邊筆記下解決方法。
內容
在 .vscode 的 settings.json 內,加入以下內容
1 2 3 |
{ "vue.server.hybridMode": true } |
參考資料
1. https://github.com/nuxt/nuxt/discussions/21843
2. https://github.com/vuejs/language-tools/pull/4206
按讚加入粉絲團