Open molszanski opened 6 months ago
Put this in <head>
and head tag won't be generated in build. You have to remove inner {}
then it will work. But sometimes it is needed for conditionals inside loop. It was working in 4.0.6 stopped working in 4.5.0.
If there is any problem the build should fail instead of output files without head.
{[1, 2, 3].map(() => <>
{<meta name="" content="" />}
</>)}
The compiled output seems to be incorrect where the body is not rendered:
// ...
return $$render`<html lang="en">
<head>
<title>document</title>
<!-- Delete next line and body will be red -->
${$$renderHead($$result)}</head><lol href="lol"></lol>
${$$renderSlot($$result,$$slots["default"])}
</html>`;
}, '<stdin>', undefined);
// ...
@bluwy is that the same cause of bug I found?
Bug caused by astro 4.2.2 it works in 4.2.1.
It should get fixed by https://github.com/withastro/compiler/pull/939
@MoustaphaDev the bug I reported should be fixed by that too?
The PR is 2 months old is something blocking merge?
Sorry for the late response, I haven't checked but the PR fixes several issues like that, so hopefully. I'll check if it does early next week and let you know! And no there's nothing major blocking it, just needs more testing. I'll hopefully be able to get it over the line next week
@MoustaphaDev I would like upgrade to latest version if you can check if this fixes the issue.
Hey @cdtut, I didn't get to work on the PR unfortunately, and probably won't be able to next week too. Sorry for the inconvenience, hope somebody will be able to pick this up!
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
Input:
Output
Notice the missing
</head>
and<body>
elements.Minimal Repro: https://stackblitz.com/edit/github-zkwgaq-g5un8g?file=src%2Fpages%2Findex.astro&file=src%2Flayouts%2FLayout.astro&on=stackblitz
What's the expected result?
valid html. Astro should omit tags it doesn't recogdnize / understand
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-zkwgaq-g5un8g?file=src%2Fpages%2Findex.astro&file=src%2Flayouts%2FLayout.astro&on=stackblitz
Participation