Skip to main content

@repo/config

Configuration utilities for the monorepo.

Features

  • JSON schema to Zod conversion
  • Date utilities (date-fns)
  • Logging with Pino
  • The shared SvelteKit config owns the adapter, preprocess, remote functions, async compiler options, project paths, Tailwind, icons, and test defaults
  • Wuchale is enabled automatically when a project contains wuchale.config.js
  • Wuchale projects receive the $locales alias automatically
  • Wuchale's Svelte runtime is included in the initial dependency optimization pass
  • The pwa(...) preset provides PWA defaults while keeping metadata and advanced plugin options configurable
  • Vite server environment settings, test discovery, and Drizzle task paths use monorepo defaults
  • Project-specific Vite settings are merged from the vite option
  • Reusable Vite Plus task groups cover Svelte apps, Svelte packages, Drizzle, and component maintenance
  • Only app task groups define development and preview servers; package task groups stay build/check focused
  • Shared Vitest defaults cover test discovery, Happy DOM, component dependency inlining, and public environment mocking
  • Workspace checks use the root Svelte plugin config so cross-package Svelte files share one compiler configuration; sync, dev, and build still use each project's SvelteKit config

Installation

import { createSvelteKitConfig, drizzleTasks, pwa, svelteAppTasks } from '../config/vite/index.ts'

export default createSvelteKitConfig(import.meta.url, {
pwa: pwa({ title: 'MonoStack' }),
tasks: {
...svelteAppTasks(),
...drizzleTasks(),
},
})

Set wuchale: false to disable automatic Wuchale detection. Pass native @vite-pwa/sveltekit overrides through pwa({ config: { ... } }), and use vite or the drizzleTasks(...) argument for project-specific overrides.