-
-
Notifications
You must be signed in to change notification settings - Fork 780
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
[unocss] does not found CSS placeholder in the generated chunks #1402
Comments
Can you provide repo? I don't know astro. |
There you go |
I tested it and found the same problem before version 0.43, I guess |
See #1423. |
Sorry, I don't understand your 'solution'. Just to clarify: I can only reproduce the problem with astro and svelte. When I comment out the css in the style tag in my svelte component, it works fine. |
Vite will transform |
Because |
@Jelenkee it works what @Dunqing said. I removed the ---
// Component Imports
import MainHead from '../components/MainHead.astro';
---
<html lang="en">
<head>
<MainHead title={title} description={description} />
</head>
<body class="dark:bg-gray-700">
<slot />
<script>import 'uno.css'</script>.
</body>
</html> |
Putting the |
@Jelenkee it works for me |
@jolo-dev Can you show me your repo? |
I get this error message when I try to build my Astro project where I use unocss.
Version: 0.45.6
There was a fix for #1341 but it didn't work for me.
I am not sure if this problem is caused by unocss, astro, svelte or even vite. Maybe you can help me.
I started debugging into unocss and found out that at this line the bundle contains a CSS-asset with css generated from my svelte components. But this CSS doesn't contain the placeholder which unocss is looking for. So it cannot be replaced and the variable
replaced
remainsfalse
.I tried to set the svelte option
emitCss
tofalse
but it didn't work. Maybe it is overridden by the astro-svelte-plugin.The text was updated successfully, but these errors were encountered: