-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: no CSS in production for projects with >1 page. #2151
Comments
This might have to do with some behavior of However, when using layouts as a component wrapper for another page, there are issues with resolving What I’d recommend doing is moving ---
import MainHead from '../components/MainHead.astro';
import BaseLayout from '../layouts/BaseLayout.astro';
---
<html>
<head>
<MainHead />
</head>
<body>
<BaseLayout>
<h1>Page Content</h1>
</BaseLayout>
</body>
</html> Does this work as a workaround for now? |
Does not seem to work either. |
@tkon99 The newest Astro version |
Thank you, @amithgeorge! |
What version of
astro
are you using?0.21.11
What package manager are you using?
npm
What operating system are you using?
Windows (reproduced in Linux)
Describe the Bug
Weirdest bug. There is still no CSS tag included in
<head>
(i.e. it disappears) when using a layout component that's referenced by more than one page.To reproduce (example below):
npm run build
andnpm run preview
, and observe the breaking CSS.about.astro
and runnpm run build
andnpm run preview
again, CSS is included correctly now.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-2qvskx-cdcoua?file=src%2Fpages%2Fabout.astro&on=stackblitz
The text was updated successfully, but these errors were encountered: