waygraph / defineConfig
Function: defineConfig()
defineConfig<
Label>(config):WaygraphConfig<Label>
Defined in: src/runtime/waygraph-config.ts:168
Typed identity helper, like defineConfig in vite.config.ts. Pass an object, or a function when values come from .env files (.env, .env.local, .env.<mode>; pick the mode with --env <mode>):
Type Parameters
Label
Label extends string = string
Parameters
config
WaygraphConfig<Label> | ((context) => WaygraphConfig<Label>)
Returns
WaygraphConfig<Label>
Example
ts
export default defineConfig(({ env }) => ({ baseUrl: env.BASE_URL }))