fix error serving with older vite versions when config.css was not defined#19859
fix error serving with older vite versions when config.css was not defined#19859mruthh wants to merge 1 commit intotailwindlabs:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe tailwindcss Vite plugin was updated to add an additional null-safe access operator when checking the 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hey! I appreciate the PR, but I would highly recommend to upgrade to a newer Vite version. While we can merge this as is, if you are on the older Vite version the build won't even work due to type checking reasons. The Additionally, if you ignore all the types, run the Vite playground, it will work ~ish. If you make a change, no new CSS will be generated, there is no HMR and a hard reload won't work either. In this case you will have to restart the server for the changes to take effect. So while this is a small fix, it's not complete and doesn't add support for Vite 4. Since Vite 4 and 5 are not supported anymore, I don't think we should spend time supporting it either. I appreciate the PR, but going to close it because of the above mentioned reasons. Thanks! |
Summary
When attempting to serve a Vue app using Vite 4.3.5 with the tailwind/vite plugin, I received the following error:
The issue was a missing
?.check. Myvite.configfile did not contain acssproperty and that crashed the plugin.Test plan
pnpm-workspace.yaml, change the vite version to^4.3.5.pnpm installplaygrounds/vite, runpnpm build && pnpm vite