lambda-packages icon indicating copy to clipboard operation
lambda-packages copied to clipboard

🐛 BUG: import.meta.env.BASE_URL is incorrect when i set base config.

Open leon-kfd opened this issue 3 years ago • 1 comments

What version of astro are you using?

1.0.0-beta.42

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

yarn

What operating system are you using?

Windows

Describe the Bug

Set base config to '/blog' in astro.config.mjs, but import.meta.env.BASE_URL is still '/'. image

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-rtg6u1?file=astro.config.mjs&on=stackblitz

Participation

  • [ ] I am willing to submit a pull request for this issue.

leon-kfd avatar Jun 10 '22 06:06 leon-kfd

Ah, I see that you're expecting the import.meta.env.BASE_URL env variable defined by Vite to be available. I think we're overriding this somehow, definitely something we can add.

natemoo-re avatar Jun 10 '22 18:06 natemoo-re