I'm trying to do a landing page with Astro, with this in my astro.config:
const config = {
site: "http://www.theWebPage.com",
output: "static",
devToolbar: {
enabled: false,
},
integrations: [
mdx(),
sitemap(),
markdoc({
allowHTML: true,
}),
tailwind(),
],
};
Regardless of what I write in site and/or base, or if I do it with the general configuration file or I create a new one and run build pointing to that file, astro replace every import.meta.env.BASE_URL with localhost:4321 in the new files created at dist folder.
It seems that whatever I do, that properties do not matter at all.
I've tried playing with putting http or https on the site, putting in the base /, two //, leaving it empty, whatever.
At the end I just went to the dist folder in vscode and replaced all localhost:4321 with the actual URL... and the page works perfect, but I'd like to learn what's the proper way of doing this and correct it in the actual project!! 😣
I don't know if it helps, but I uploaded it to github pages previously, following astro web tutorial, and had no problems with it... in this case I'm building it myself and uploading the dist folder to a server(the server is IONOS, not in the deployment guides currently in astro webpage)
I don't know what's happening or how to solve it properly... any help would be appreciated