import.meta.dirname is only present for ESM files in Node.js >=20.11.0 / >= 21.2.0.
New to Tubrorepos and Monorepos in general. I started with the Turborepo Vite example.
I wanted to:
- make a custom linting package using a flat eslint.config.js that i can pull into any app or package
- get a JIT internal ui package going - easy
- Create a compiled ui package - difficult
I found the Turbo Repo documentation lacking on the last one. A little help from ChatGPT on crafting the exports on the @repo/ui package.
This Turborepo includes the following packages and apps:
docs
: a vanilla vite ts appweb
: another vanilla vite ts appastrodemo
: an Astro App I will start pluggin external ui into.@repo/ui
: a stub component & utility library shared by bothweb
anddocs
applications@repo/eslint-config
: sharedeslint
configurations@repo/typescript-config
:tsconfig.json
s used throughout the monorepo
Each package and app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- turbovite