nuxt-modules / tailwindcss

Tailwind CSS module for Nuxt
https://tailwindcss.nuxtjs.org
MIT License
1.69k stars 183 forks source link

fix: #883 Tab view src leading baseURL #885

Closed richardevcom closed 3 months ago

richardevcom commented 3 months ago

Fixed issue #883: Cannot find any path matching /_tailwind/, when using baseUrl: /dev/. Additionally added conditional baseURL output, where if it matches / it prefixes empty string '', making final Tab view src always /dev/_tailwind/ (depending on nuxt.config.ts) or /_tailwind/.

🔗 Linked issue

Issue #883

❓ Type of change

📚 Description

 Fixed issue #883: Cannot find any path matching /_tailwind/, when using baseUrl: '/dev/'.

This change is required to fix Tailwind Config Viewer embedded url by appending missing baseUrl setting (if set).

netlify[bot] commented 3 months ago

Deploy Preview for nuxt-tailwindcss ready!

Name Link
Latest commit 6feef565880a0fcf3970f030f3aa12a5a550bfc7
Latest deploy log https://app.netlify.com/sites/nuxt-tailwindcss/deploys/66abbf962ebedb0008b95b63
Deploy Preview https://deploy-preview-885--nuxt-tailwindcss.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

what-the-diff[bot] commented 3 months ago

PR Summary

nhh commented 3 months ago

I am using nuxt2 and experiencing a smiliar issue. My app tries to handle /_tailwind and loads nuxt instead of the tw viewer. Is this fix only for nuxt3?

richardevcom commented 3 months ago

I am using nuxt2 and experiencing a smiliar issue. My app tries to handle /_tailwind and loads nuxt instead of the tw viewer. Is this fix only for nuxt3?

Yes, I think so. As far as I know Nuxt 2 baseURL config differs from Nuxt 3. I'm not sure yet, how the module works on Nuxt 2, but I will try to test it on version 2 today.

Can you submit your reproduction of the issue in #883?

nhh commented 3 months ago

@richardevcom Sorry, I think my issue is not directly related to this fix. I opened #886 Please dont mind my comment here :)