Vue
Use @golar/vue to add Vue support to Golar.
Install the Plugin
Section titled “Install the Plugin”Make sure vue is installed in your project.
Then install the Golar plugin:
npm i -D @golar/vuepnpm add -D @golar/vueyarn add -D @golar/vueRegister the Plugin
Section titled “Register the Plugin”Add the plugin import to golar.config.ts:
import { defineConfig } from 'golar/unstable'import '@golar/vue'
export default defineConfig({})Run Golar
Section titled “Run Golar”Once the plugin is registered, run Golar in the default mode:
npx golarpnpm golaryarn golarThis command loads golar.config.ts, runs linting, and then type-checks your project files.
Declaration Emit
Section titled “Declaration Emit”If you need declaration emit for Vue files, use tsc mode:
npx golar tsc --declaration --emitDeclarationOnlypnpm golar tsc --declaration --emitDeclarationOnlyyarn golar tsc --declaration --emitDeclarationOnlyThis emits .vue.d.ts files for Vue components.
VitePress
Section titled “VitePress”Vue Language Tools supports specifying VitePress file extensions via vitePressExtensions in tsconfig.json.
To enable typechecking support for VitePress .md files, it’s required to explicitly configure the Vue plugin:
import { defineConfig } from 'golar/unstable'import * as vue from '@golar/vue'
vue.configure({ vitePressExtensions: ['.md'],})
export default defineConfig({}){ "vueCompilerOptions": { "vitePressExtensions": [".md"] }}Official Tooling Used
Section titled “Official Tooling Used”Golar’s Vue support is built on the official @vue/language-core package.