-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Compiled CSS is injected too late #45
Comments
This is because Vite assets are injected after CSS & JS assets. For now if you were to add your assets as a vite asset instead then it should work again, but longer term I'd like the priority system to be able to mix and match the different types. https://wintercms.com/docs/v1.2/docs/console/asset-compilation-vite |
How do I convert this to Vite? Event::listen('backend.page.beforeDisplay', function($controller, $action, $params) {
$controller->addVite('/plugins/aic/extendwinterpages/assets/css/skin-reset.css', 'Aic.ExtendWinterPages');
}); Event::listen('backend.page.beforeDisplay', function($controller, $action, $params) {
$controller->addVite('assets/css/skin-reset.css', 'AIC.v26');
}); Leaving the second parameter empty Also how will this work with caching? WIth the previous method I could just increase the 'v' number by one |
@AIC-BV you need to use the |
@LukeTowers Seems to work in general!
I did the following commands:
Moved my CSS to the new location generated by Vite
|
What does your project's package.json look like? |
In my plugin
In my root
|
@AIC-BV do you still get that error message even with Winter.TailwindUI being in your workspaces property? |
No if Winter.TailwindUI is in the workspaces property the error doesn't appear but Winter.TailwindUI gets recompiled when doing Its only in there because the error message told me to install it for Winter.TailwindUI. I assume |
@AIC-BV when you remove it and then run I've updated the message displayed in wintercms/winter@fb2e6e3 to hopefully improve the clarity of what is happening. |
@AIC-BV to compile a specific package you need to pass the @jaxwilko any thoughts on making a tweak to the |
|
The Tailwind UI CSS is injected in the HTML after all our own assets are injected, making it more difficult to override css
I think this is since the latest version?
The text was updated successfully, but these errors were encountered: