diff options
author | 2023-01-04 16:50:23 -0400 | |
---|---|---|
committer | 2023-01-04 16:50:23 -0400 | |
commit | 5df4a89a3a5a4b2660ae6e911a3833d90efa8f2f (patch) | |
tree | b433ed3dd496bec9e8e7a5a7b266953adf5ce64d | |
parent | c0d3877d0d1ed287b1eee3da23a65dd0d10aec53 (diff) | |
download | astro-5df4a89a3a5a4b2660ae6e911a3833d90efa8f2f.tar.gz astro-5df4a89a3a5a4b2660ae6e911a3833d90efa8f2f.tar.zst astro-5df4a89a3a5a4b2660ae6e911a3833d90efa8f2f.zip |
[docs] Document base (#5693)
-rw-r--r-- | packages/astro/src/@types/astro.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 8d735bf23..0721ba82c 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -424,15 +424,22 @@ export interface AstroUserConfig { * @name base * @type {string} * @description - * The base path to deploy to. Astro will build your pages and assets using this path as the root. Currently, this has no effect during development. + * The base path to deploy to. Astro will use this path as the root for your pages and assets both in development and in production build. * - * You can access this value in your app via `import.meta.env.BASE_URL`. + * In the example below, `astro dev` will start your server at `/docs`. * * ```js * { * base: '/docs' * } * ``` + * + * When using this option, all of your static asset imports and URLs should add the base as a prefix. You can access this value via `import.meta.env.BASE_URL`. + * + * ```astro + * <a href="/docs/about/">About</a> + * <img src=`${import.meta.env.BASE_URL}/image.png`> + * ``` */ base?: string; |