expo-router
Version:
Expo Router is a file-based router for React Native and web applications.
116 lines (115 loc) • 4.02 kB
JSON
{
"title": "expo-router config plugin options",
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Props",
"definitions": {
"AsyncRouteOption": {
"description": "Should Async Routes be enabled. `production` is currently web-only and will be disabled on native.",
"oneOf": [
{
"type": "string",
"enum": ["development", "production"]
},
{
"type": "boolean"
}
]
},
"Props": {
"type": "object",
"properties": {
"origin": {
"description": "Production origin URL where assets in the public folder are hosted. The fetch function is polyfilled to support relative requests from this origin in production, development origin is inferred using the Expo CLI development server.",
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"headOrigin": {
"description": "A more specific origin URL used in the `expo-router/head` module for iOS handoff. Defaults to `origin`.",
"type": "string"
},
"root": {
"description": "Changes the routes directory from `app` to another value. Defaults to `app`. Avoid using this property.",
"type": "string"
},
"platformRoutes": {
"description": "Enable or disable platform-specific routes. Defaults to `true`.",
"type": "boolean"
},
"sitemap": {
"description": "Enable or disable automatically generated routes. Defaults to `true`.",
"type": "boolean"
},
"asyncRoutes": {
"description": "Should Async Routes be enabled. `production` is currently web-only and will be disabled on native.",
"oneOf": [
{
"$ref": "#/definitions/AsyncRouteOption"
},
{
"type": "object",
"properties": {
"ios": {
"$ref": "#/definitions/AsyncRouteOption"
},
"android": {
"$ref": "#/definitions/AsyncRouteOption"
},
"web": {
"$ref": "#/definitions/AsyncRouteOption"
},
"default": {
"$ref": "#/definitions/AsyncRouteOption"
}
},
"additionalProperties": true
}
]
},
"partialRouteTypes": {
"description": "Enable or disable partial route type generation. Defaults to `true`.",
"type": "boolean"
},
"redirects": {
"description": "Enable static redirects. Defaults to `true`.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": ["source", "destination"],
"properties": {
"source": {
"description": "The previous file path that this route should redirect from",
"type": "string"
},
"destination": {
"description": "The target file path that this route should redirect to",
"type": "string"
},
"temporary": {
"description": "Whether the redirect is temporary or permanent. Defaults to `false`.",
"type": "boolean",
"default": false
},
"methods": {
"description": "HTTP methods that should be redirected. Omit to redirect all methods.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"]
}
}
}
}
}
},
"additionalProperties": false
}
}
}