@affordances/next/config
Type Aliases
AffordancesConfig
type AffordancesConfig = object;Properties
name?
name?: string;plugins?
plugins?: AffordancesPlugin[];root?
root?: string;AffordancesPlugin
type AffordancesPlugin = <C>(config) => C;Type Parameters
| Type Parameter |
|---|
C extends Config |
Parameters
| Parameter | Type |
|---|---|
config | C |
Returns
C
Config
type Config = Pick<NextConfig, "rewrites" | "headers" | "turbopack"> & object;Type Declaration
| Name | Type |
|---|---|
webpack? | ((config, context) => any) | null |
Rewrite
type Rewrite = object;Properties
destination
destination: string;has?
has?: object[];| Name | Type |
|---|---|
key | string |
type | "header" | "query" |
value? | string |
source
source: string;Rewrites
type Rewrites = object;Properties
afterFiles
afterFiles: Rewrite[];beforeFiles
beforeFiles: Rewrite[];fallback
fallback: Rewrite[];Variables
API_PATH
const API_PATH: "/api/affordances/graph" = '/api/affordances/graph';rewrites
const rewrites: Rewrite[];Functions
toSource()
function toSource(route): string;Parameters
| Parameter | Type |
|---|---|
route | string |
Returns
string
withAffordances()
function withAffordances<C>(nextConfig?, options?): C;Type Parameters
| Type Parameter |
|---|
C extends Config |
Parameters
| Parameter | Type |
|---|---|
nextConfig? | C |
options? | AffordancesConfig |
Returns
C