From c0b3d0329a3936f535966937c514ed7146194c08 Mon Sep 17 00:00:00 2001 From: yubo Date: Tue, 21 May 2024 16:27:32 +0800 Subject: [PATCH] docs: add additional example for setting `baseURL` and `cdnURL` (#27273) --- packages/schema/src/config/app.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/schema/src/config/app.ts b/packages/schema/src/config/app.ts index f9ad11e8c7..3b0feb2cd9 100644 --- a/packages/schema/src/config/app.ts +++ b/packages/schema/src/config/app.ts @@ -45,7 +45,17 @@ export default defineUntypedSchema({ /** * The base path of your Nuxt application. * - * This can be set at runtime by setting the NUXT_APP_BASE_URL environment variable. + * For example: + * @example + * ```ts + * export default defineNuxtConfig({ + * app: { + * baseURL: '/prefix/' + * } + * }) + * ``` + * + * This can also be set at runtime by setting the NUXT_APP_BASE_URL environment variable. * @example * ```bash * NUXT_APP_BASE_URL=/prefix/ node .output/server/index.mjs @@ -63,6 +73,16 @@ export default defineUntypedSchema({ /** * An absolute URL to serve the public folder from (production-only). * + * For example: + * @example + * ```ts + * export default defineNuxtConfig({ + * app: { + * cdnURL: 'https://mycdn.org/' + * } + * }) + * ``` + * * This can be set to a different value at runtime by setting the `NUXT_APP_CDN_URL` environment variable. * @example * ```bash