diff options
author | 2023-06-27 11:15:10 -0400 | |
---|---|---|
committer | 2023-06-27 17:15:10 +0200 | |
commit | b51d515d2dfdc0ba5d5a93029f4de82c3babe9bc (patch) | |
tree | 46747ba23b380f60208b97d3ee3b7d16f25aa11b | |
parent | f6feff7a2991fb94e11ee1b70ac606e4c053062b (diff) | |
download | astro-b51d515d2dfdc0ba5d5a93029f4de82c3babe9bc.tar.gz astro-b51d515d2dfdc0ba5d5a93029f4de82c3babe9bc.tar.zst astro-b51d515d2dfdc0ba5d5a93029f4de82c3babe9bc.zip |
Update astro.ts to clarify configuration settings for base (#7392)
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
-rw-r--r-- | packages/astro/src/@types/astro.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index cca5753fe..52d15211b 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -546,10 +546,12 @@ export interface AstroUserConfig { * ``` * * 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`. + * + * By default, the value of `import.meta.env.BASE_URL` includes a trailing slash. If you have the [`trailingSlash`](https://docs.astro.build/en/reference/configuration-reference/#trailingslash) option set to `'never'`, you will need to add it manually in your static asset imports and URLs. * * ```astro * <a href="/docs/about/">About</a> - * <img src=`${import.meta.env.BASE_URL}/image.png`> + * <img src=`${import.meta.env.BASE_URL}image.png`> * ``` */ base?: string; |