自媒体/自媒体已解锁12

Configuration

Understand and customize every aspect of your DocKit application.

Config File

DocKit uses a dockit.config.ts file at the project root. TypeScript is fully supported for editor IntelliSense.

TypeScript
import { defineConfig } from "dockit";

export default defineConfig({
  root: "./src",
  output: "./dist",
  port: 3000,
  logLevel: "info",
  plugins: [],
});

Options Reference

OptionTypeDefaultDescription
rootstring"./src"Source directory for your application.
outputstring"./dist"Output directory for the production build.
portnumber3000Port the dev server listens on.
logLevelstring"info"Verbosity of log output (debug | info | warn | error).
pluginsPlugin[][]Array of DocKit plugins to activate.
strictbooleantrueEnable strict TypeScript checks across the project.

Environment Variables

Prefix public variables with DOCKIT_PUBLIC_. All other variables remain server-only.

.env
DOCKIT_PUBLIC_APP_NAME=MyApp
DOCKIT_PUBLIC_API_URL=https://api.example.com
DATABASE_URL=postgresql://user:pass@localhost/db
SECRET_KEY=super-secret-value

Advanced Configuration

For monorepo setups, use the extends key to inherit from a base config:

TypeScript
export default defineConfig({
  extends: "../../dockit.base.ts",
  port: 4000,
});