Introduction
This project was first created using thecreate-turbo npm package:
It is recommended that you read through the official documentation to understand the breakdown of the monorepo.
Changes to the official Turbo starter
The official Turbo starter is a great starting point for a monorepo, but it has some configurations I did not need. As I will not be sharing code between the backend and frontend (nor the docs), I have removed thepackages/ui directory.
If you want to add a new package to the project, please reference the official documentation.
For quick reference:
- Create a new folder in
packages/<folder> - Add a
package.json, withnameandtypespointing atsrc/index.ts[x] - Add
src/index.ts[x], with at least one named export - Install your packages from
root
Turbo.json
The currently configuredturbo.json does not have many changes from the official starter. The only change is the addition of the globalEnv key.
globalEnv, you will receive an eslint error when referencing variables in your .env, however, your code will still work.
There are different ways that people solve this. While it’s possible to use
"globalDependencies": ["**/.env"], that did not work in this project.\