A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://vuejs.github.io/vetur/reference/ below:

Website Navigation


vetur.config.js | Vetur

# vetur.config.js

A new configuration file for Vetur and VTI

# Example # Noun # Spec # How to use # VTI

You can use it to override VTI default settings.

# Vetur

This 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.

# How to find vetur.config.js

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.

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