Tailwind JIT doesn't pick up classes when extending off a project where `srcDir` is set

This issue has been tracked since 2023-03-09.

Version

@nuxtjs/tailwindcss: 6.4.0
nuxt: v3.2.3

Reproduction Link

Can't make stackblitz reproduce because vite throws access issue errors when 2 nuxt projects are present for me atm

Steps to reproduce

Set the srcDir to something like src in the nuxt config of the project you want to use as a base. When extending that base project Nuxt picks up components just fine so the srcDir generally is respected but Tailwind jit doesnt pick up the classes used there.

What is Expected?

The jit compiler should be able to pick up classes regardless of srcDir in the base project.

What is actually happening?

Classes are missing from the compiler output. Removing the srcDir prop from the nuxt config and placing the component folder in the root of the projected works around the issue.

RomainMazB wrote this answer on 2023-03-14

Hi @warflash , did you read that part of the documentation?
https://tailwindcss.nuxtjs.org/getting-started/options#configpath
specifically the note:

If you customize the srcDir property in your nuxt.config file, you'll have to update the configPath value to '~~/tailwind.config' (~~ is the alias for rootDir) for the tailwind.config file to be recognized properly. Read more in the Issue #114.

More Details About Repo
Owner Name nuxt-modules
Repo Name tailwindcss
Full Name nuxt-modules/tailwindcss
Language TypeScript
Created Date 2019-04-04
Updated Date 2023-03-29
Star Count 1285
Watcher Count 12
Fork Count 157
Issue Count 57

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date