vetur.config.js
A new configuration file for Vetur and VTI
# Example # Noun/
.
Helpful for cross-platform use project.
We can use it quickly and directly.
Same as above. You can get typings like
@JSDoc
.
You can use it to override VTI default settings.
# VeturThis profile takes precedence over vscode setting. It will find it when Vetur initialization. If it isn't exist, It will use { settings: {}, projects: ['./'] }
. This will ensure consistency with past behavior.
vetur.config.js
process.cwd()
value in VTI and you can set file path in CLI params.PS. Each root can have its own vetur.config.js in VSCode Multi root feature.
# Detail # Definition #settings
Incoming to vue language server config.
In VLS, it will merge (vscode setting or VTL default config) and vetur.config.js settings
.
Notice: It only affects the settings used by Vetur. For example, we use typescript.preferences.quoteStyle
in Vetur. so you can set it. But it don't affect original TypeScript support in VSCode.
projects
The monorepo need a baseline or logic. Possible options are package.json
or tsconfig.js
. But both are used for node and typescript projects. We're likely to waste unnecessary resources on things we don't need. So I figured the best way to do it was through the setup.
For detailed discussion, see this RFC (opens new window).
if projects[]
is only a string, It is a shorthand when you only need to define root
.
projects[].root
All runtime dependencies is base on value of this property. Like typescript
, prettier
, @prettier/pug
. Also Vetur find ./package.json
and ./tsconfig.js
by default.
projects[].package
We can get the project name or dependency info from here. But We only use it to determine the version of vue now. But it doesn't rule out the use of more.
#projects[].tsconfig
Typescript project profile. It's the key to helping us support JavaScript and TypeScript. We also use it for support template interpolation.
# Why isn't array?If you are familiar with Typescript, you know that TypeScript allows support for multiple discrete tsconfig.json
files. But in the vue ecosystem, It's almost completely unsupported. For example, we often use webpack to compile Vue projects. The vue-loader
calls ts-loader
for Typescript support. But ts-loader
only supports one tsconfig.json
file.
For these reasons, we also don't support it. It can reduce development and maintenance costs.
PS. jsconfig.json
is also supported.
projects[].snippetFolder
Vetur Custom snippets folder path
#projects[].globalComponents
We have some amazing features, Like template interpolation
. But it only work when register component in component. For example:
With this property available, we will parse vue component files that match the glob on vls startup. You can support template interpolation
for that components anywhere in the project.
This property allow two type values in array.
string
) format (opens new window) Vetur will call glob lib with projects[].root
for loading component when value is string. It use path.basename(fileName, path.extname(fileName))
as component name.{ name: string, path: string }
) Vetur use this data directly. It's the most flexible way. If this is a relative path, It is based on projects[].root
.Notice: It won't actually do it. You need to use require.context
and Vue.component
in your project. more (opens new window)
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