Add an Astro Project

The code for this example is available on GitHub:

Supported Features

Because we are not using an Nx plugin for Astro, there are few items we'll have to configure manually. We'll have to configure our own build system. There are no pre-created Astro-specific code generators. And we'll have to take care of updating any framework dependencies as needed.

✅ Run Tasks ✅ Cache Task Results

{ "extends": "astro/tsconfigs/strict", "compilerOptions": { "baseUrl": ".", "plugins": [ { "name": "@astrojs/ts-plugin" } ], "paths": { "@myrepo/ui": ["ui/src/index.ts"] } } }

An easier option is to allow importing the files directly instead of reexporting the `.astro` files via the `index.ts`. You can do this by allowing deep imports in the tsconfig paths ```json

This allows imports in our .astro files from other projects like so.

src/pages/index.astro
import Card from '@myrepo/ui/Card.astro'; import Footer from '@myrepo/ui/Footer.astro'; import Header from '@myrepo/ui/Header.astro';