Skip to content
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

Tailwind viewer not available #292

Closed
DavidDeSloovere opened this issue Jun 14, 2023 · 4 comments
Closed

Tailwind viewer not available #292

DavidDeSloovere opened this issue Jun 14, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@DavidDeSloovere
Copy link
Contributor

Version

@nuxthq/ui: 2.4
nuxt: 3.5.2

Reproduction Link

https://github.com/nuxtlabs/ui.git
npm run dev will launch the docs site where this can be tested

Steps to reproduce

What is Expected?

/_tailwind/ should return the tailwind viewer page as describe in https://tailwindcss.nuxtjs.org/tailwind/viewer

What is actually happening?

page is not available, also isn't mentioned in output of npm run dev

"@nuxtjs/tailwindcss" should not be added to the modules as per installation instructions of NuxtLabs UI, but I did try that to see what happens:

  • Adding tailwind explicitly after UI does not help. Ie. modules: ["@nuxthq/ui", "@nuxtjs/tailwindcss"],
  • Adding tailwind explicitly before UI make the view available. Ie. modules: ["@nuxtjs/tailwindcss", "@nuxthq/ui"],, but causes build errors.

Also mentioned in #265

@DavidDeSloovere DavidDeSloovere added the bug Something isn't working label Jun 14, 2023
@neilmerton
Copy link

I might be wrong, but it looks like this line disables the Tailwind viewer:

https://github.com/nuxtlabs/ui/blob/a274a0cdbbf197893d8a50edc7a31f51c16024c7/src/module.ts#L136

Copy link
Member

Viewer is now enabled by default, but it can still be disabled manually through nuxt.config.ts:

export default defineNuxtConfig({
  tailwindcss: {
    viewer: false
  }
})

@DavidDeSloovere
Copy link
Contributor Author

DavidDeSloovere commented Jun 15, 2023

Just tried the edge release and the /_tailwind/ endpoint is available now.
But I doesn't render because of issues in .js files. There seems to be HTML appended at the end by Nuxt.
Edit: This might be the issue > nuxt-modules/tailwindcss#561 (I have ssr: false)

Copy link
Member

I just pushed 07e471d this morning to let the viewer enabled by default with the documentation updated: https://ui.nuxtlabs.com/getting-started/theming#dark-mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants