Append ${import.meta.env.BASE_URL} to URLs to make it behave correctly on base change (such as in production)
Use import.meta.env instead of process.env
Remove <link rel="sitemap" href="/sitemap.xml" /> since there is no sitemap generator
PS: I have tried to specify base in many ways such as '', 'lol', '/lol', 'lol/', '/lol/'. Apparently, all will be transformed into a proper URL, '/' and '/lol/'. So there is no need in using / between import.meta.env.BASE_URL and the path.
${import.meta.env.BASE_URL}
to URLs to make it behave correctly on base change (such as in production)import.meta.env
instead ofprocess.env
<link rel="sitemap" href="/sitemap.xml" />
since there is no sitemap generatorPS: I have tried to specify
base
in many ways such as''
,'lol'
,'/lol'
,'lol/'
,'/lol/'
. Apparently, all will be transformed into a proper URL,'/'
and'/lol/'
. So there is no need in using/
betweenimport.meta.env.BASE_URL
and the path.