From 911c1d315cb038c584c5ee44d2aabe5d2acfaaca Mon Sep 17 00:00:00 2001 From: Zihan Chen Date: Tue, 4 Oct 2022 22:30:59 +0800 Subject: [PATCH] Update config base type description (#4954) --- packages/astro/src/@types/astro.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 47edabea3..213040ba5 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -420,12 +420,21 @@ export interface AstroUserConfig { * @type {string} * @description * The base path you're deploying to. Astro will match this pathname during development so that your development experience matches your build environment as closely as possible. In the example below, `astro dev` will start your server at `/docs`. - * + * * ```js * { * base: '/docs' * } * ``` + * + * When using this option, you should mind that all of your imports will be affected. In this example, all of the imports including static resources and codes should add a prefix `/docs/`. + * + * For example, if you want to use a image in your Astro component, you need to change it from '/someimg.png' into '/docs/someimg.png'. + * + * ```astro + * + * + * ``` */ base?: string;