Navigate to your VS Code settings. On Windows/Linux - File > Preferences > Settings. On macOS - Code > Preferences > Settings.
Add vue
to your eslint.validate
setting, for example:
package.json
must exist in the project root, Vetur uses it to determine the installed Vue version.
Next, create a jsconfig.json
or tsconfig.json
, which will include
all Vue files and files that they import from, for example:
jsconfig.json
tsconfig.json
tsconfig.json
for a pure TS project.jsconfig.json
for a pure JS project.allowJs: true
for a mixed JS / TS project.If you are using Webpack's alias (opens new window) or TypeScript's path mapping (opens new window) to resolve components, you need to update Vetur's tsconfig.json
or jsconfig.json
.
For example:
jsconfig.json:
index.vue
# TypescriptYou need to add a shim type file to import a Vue SFC in a TypeScript file.
# Vue2 # Vue3 # AdvancedIf you use a monorepo, VTI or package.json
and tsconfig.json/jsconfig.json
does not exist at project root, you can use vetur.config.js
for advanced settings.
Please add vetur.config.js
at project root or monorepo project root.
Vetur supports this feature now, but it has some limits.
If you're using the editor SDKs (Yarn Editor SDKs (opens new window)) with typescript and you want to use the typescript server wrapper created by yarn you'll need to set the typescript.tsdk
to the directory of the editor sdk's tsserver:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4