Learn how to set up and use Typeconf effectively in a monorepo environment
This guide will walk you through setting up and using Typeconf in a monorepo
environment, where you can define your configurations in a shared package and
use them across multiple projects. The whole process is similar to our
quickstart guide, because with the monorepo setup you can just use a separate
configuration package and share it across your projects.
$ npm install --save @typeconf/sdk# Or with React/Next$ npm install --save @typeconf/react-sdk
Now you can use your shared configurations in other packages within your monorepo:
Copy
// packages/backend/src/index.tsimport { UserSettings } from "@your-org/config";import { readConfig } from "@typeconf/sdk";// with React: import { readConfig } from "@typeconf/react-sdk/server";// Path to your config without extensionconst config: UserSettings = readConfig("packages/configs/user-settings");