You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I have this config:
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap";
// https://astro.build/config
export default defineConfig({
site: "https://www.reksio-wet.pl",
integrations: [tailwind(), sitemap()],
compressHTML: true,
});
and this file index.astro:
<html>
<head></head>
<body>
<p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Sint facere
inventore nulla explicabo libero delectus voluptatibus,
est, ut fugiat recusandae quam, iste natus.
Iste, non minus. Beatae sit nisi sint!
</p>
</body>
</html>
When I run astro build I get this file in dist folder:
<!DOCTYPE html><html><head><link rel="stylesheet" href="/_astro/rodo.d2d0dbb6.css" /></head><body><p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Sint facere
inventore nulla explicabo libero delectus voluptatibus,
est, ut fugiat recusandae quam, iste natus.
Iste, non minus. Beatae sit nisi sint!
</p></body></html>
What's the expected result?
dist/index.html
<!DOCTYPE html><html><head><link rel="stylesheet" href="/_astro/rodo.d2d0dbb6.css" /></head><body><p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Sint facere inventore nulla explicabo libero delectus voluptatibus, est, ut fugiat recusandae quam, iste natus. Iste, non minus. Beatae sit nisi sint!</p></body></html>
That's not a bug, it's intentional. Newlines and white spaces inside HTML tags have a meaning actually, You can check this issue, which provides more background: withastro/compiler#815
Right now I'm updating an app from Astro v2.8.0 to v3.6.4, and facing some issues due to breaking changes in compressHTML handling. Astro v3 preserve line breaks in .astro components, while v2 doesn't
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I have this config:
and this file index.astro:
When I run astro build I get this file in dist folder:
What's the expected result?
dist/index.html
Link to Minimal Reproducible Example
https://stackblitz.com/edit/stackblitz-starters-qesr2a?file=dist%2Findex.html
Participation
The text was updated successfully, but these errors were encountered: