简体   繁体   English

Tailwind styles 在部署和 WSL 上损坏

[英]Tailwind styles broken on deployment and WSL

While using Next.js + Tailwind + DaisyUI in development on Mac everything works as expected and all styles look normal, however when developing on WSL I noticed that my styles look very different and are pretty much broken from what I would expect.在 Mac 上的开发中使用 Next.js + Tailwind + DaisyUI 时,一切都按预期工作,所有 styles 看起来都很正常,但是在 WSL 上开发时,我注意到我的 styles 看起来非常不同,并且与我的预期完全不同。 I'm encountering this same issue when deploying my site to Vercel.将我的网站部署到 Vercel 时,我遇到了同样的问题。 Does anyone know how I can resolve this?有谁知道我该如何解决这个问题?

Development (Mac)开发(Mac) 在此处输入图像描述

Deployment (Vercel)部署(Vercel) 在此处输入图像描述

tailwind.config.js tailwind.config.js

在此处输入图像描述

I attempted to recreate the issue on my mac with no luck, however it seems this issue is showing up on Linux and Vercel deployment.我试图在我的 Mac 上重新创建问题,但没有成功,但似乎这个问题出现在 Linux 和 Vercel 部署上。

Update: Turns out the issue stemmed from the fact that I had a css file in my styles folder and when I imported it into my homepage, it messed up the styling for everything else.更新:原来这个问题源于我的 styles 文件夹中有一个 css 文件,当我将它导入我的主页时,它弄乱了其他所有内容的样式。

Not sure if this is supposed to be the expected behavior, but it did solve the issue不确定这是否应该是预期的行为,但它确实解决了问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM