Update config base type description (#4954)

This commit is contained in:
Zihan Chen 2022-10-04 22:30:59 +08:00 committed by GitHub
parent c733d4fb81
commit 911c1d315c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
* <!-- <img src="/someimg.png"> is not correct. -->
* <img src="/docs/someimg.png">
* ```
*/
base?: string;