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 only works if "app" folder exists #190

Closed
flipperlite opened this issue Jan 30, 2024 · 2 comments
Closed

Tailwind only works if "app" folder exists #190

flipperlite opened this issue Jan 30, 2024 · 2 comments

Comments

@flipperlite
Copy link

I looked at this issue but I'm not sure if it's related. I had been trying to integrate Tailwind into my NS 8.6.x project with no luck. I think it's scanning a hard-coded "app" folder for TW CSS class references and only bundling what it finds. Any XML files that exist outside of the "app" folder are not scanned and bundled with the TW CSS. I have two identical projects except the code folder named "app" (working) and "src" (broken). I've also tried naming the folder "app2" and it fails too. You can actually have both folders but only classes found in the "app" folder will be available in the "src" TW references.

WORKING demo using "app" folder

BROKEN demo using "src" folder

If it is hard-coded, at least update the README.md to avoid future issues and headaches. Ideally, it's set to scan all folders for TW references.

BTW, the NS CLI creator puts code into the "src" folder, not the "app" folder which created my problem. E.g. ns create new-project-ts --template @nativescript/template-drawer-navigation-ts.

@rigor789
Copy link
Member

The folder can differ between templates, you can change the tailwind.config.js to look for classes in any folder, the readme is an example using the app folder, but you are free to change that to wherever your files are.

image

@flipperlite
Copy link
Author

Thank you. Please close this issue. I'll look at the README.md file and update with some wording for those who just copy /paste the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants