Skip to main content

Framework - Astro

This preset is the framework layer for Astro projects in your TypeScript config.

It sets the modern, browser-oriented compiler options an Astro project expects — native .ts and .tsx import extensions, isolatedModules, the DOM libraries, ESNext modules, Bundler module resolution, and preserved JSX. Use it after Nova's required essentials, strict, app-role, and browser-runtime layers:

tsconfig.astro.json
json
{
  "extends": [
    "@cbnventures/nova/presets/tsconfig/dx-essentials.json",
    "@cbnventures/nova/presets/tsconfig/dx-strict.json",
    "@cbnventures/nova/presets/tsconfig/role-app.json",
    "@cbnventures/nova/presets/tsconfig/runtime-browser.json",
    "@cbnventures/nova/presets/tsconfig/fw-astro.json"
  ],
  "include": [
    ".astro/types.d.ts",
    "./src/**/*"
  ]
}

Compiler Options

OptionValuePurpose
allowImportingTsExtensionstrueAccepts native .ts and .tsx import paths used by Astro source files.
isolatedModulestrueKeeps every file safe for independent transpilation.
jsx"preserve"Leaves JSX for Astro's Vite pipeline to transform.
lib["DOM", "DOM.Iterable", "ESNext"]Provides browser APIs, iterable DOM collections, and modern JavaScript.
module"ESNext"Preserves modern ECMAScript modules for the bundler.
moduleResolution"Bundler"Resolves packages with bundler-aware import rules.