Skip to content

Astro

Use @golar/astro to add Astro support to Golar.

Make sure astro is installed in your project.

Then install the Golar plugin:

Terminal window
npm i -D @golar/astro

Add the plugin import to golar.config.ts:

golar.config.ts
import { defineConfig } from 'golar/unstable'
import '@golar/astro'
export default defineConfig({})

Before running Golar, run astro sync so Astro types are generated for your project.

Terminal window
npx astro sync

Once the plugin is registered and Astro types are generated, run Golar in the default mode:

Terminal window
npx golar

This command loads golar.config.ts, runs linting, and then type-checks your project files.

Golar’s Astro support is built on the official withastro/compiler.