Skip to content

Tailwind being installed even if I didn't selected it in the CLI #85

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

Open
GuilhermeAmado opened this issue Apr 8, 2025 · 4 comments
Open

Comments

@GuilhermeAmado
Copy link

GuilhermeAmado commented Apr 8, 2025

Which project does this relate to?

Create Tanstack App

Describe the bug

Tailwind is being installed and configured even if I didn't selected it in the CLI:
Image

cta.json content:

{
  "framework": "react",
  "typescript": true,
  "projectName": "backoffice",
  "mode": "file-router",
  "tailwind": false,
  "packageManager": "pnpm",
  "toolchain": "biome",
  "variableValues": {},
  "git": true,
  "version": 1,
  "existingAddOns": [
    "clerk",
    "start",
    "t3env",
    "tanstack-query"
  ]
}

Image

Image

Steps to Reproduce the Bug or Issue

  1. Run pnpm dlx create-tsrouter-app --add-ons
  2. Don't select that you want to use Tailwind
  3. Check the project after all is installed and configured

Expected behavior

I expected the CLI to respect my selections.

Screenshots or Videos

No response

Platform

  • OS: [Windows]
  • Version: [v0.12.0]

Additional context

No response

@jherr
Copy link
Collaborator

jherr commented Apr 8, 2025

Yeah, for sure that's a bug. The issue is that the demo pages for some of these add-ons (clerk, start, tanstack-query) all assume Tailwind for formatting.

So there are two ways to go that I can think of:

  1. If you've chosen add-ons then don't prompt for Tailwind because we will always add it.
  2. Prompt if you want demo pages for your add-ons, in which case we add Tailwind.

I don't think it's reasonable to expect that we would have two different flavors of demo pages based on Tailwind vs not Tailwind.

@GuilhermeAmado
Copy link
Author

@jherr Why is that? I started another project using the CLI last week with the same options and with the demo pages and I didn't had this problem. It must be something that changed recently.

@jherr
Copy link
Collaborator

jherr commented Apr 9, 2025

I dunno, create-tsrouter-app from the beginning of having add-ons has required Tailwind support (even if you say no.)

@mariogl
Copy link

mariogl commented May 10, 2025

So there are two ways to go that I can think of:

  1. If you've chosen add-ons then don't prompt for Tailwind because we will always add it.
  2. Prompt if you want demo pages for your add-ons, in which case we add Tailwind.

I would go with option 2 (prompting if the user wants demo pages).

Not everyone needs or wants the demo pages, especially when it's not the first time using the tool. Prompting for demo pages makes the setup more transparent, and it's a good way to explain why Tailwind might be added.

That way, if someone chooses not to install Tailwind but opts in to demo pages, it won’t be surprising to see Tailwind included — it'll be clearly explained during the prompt.

(Edit: I've opened a PR implementing something similar to option 1, because Tailwind is actually enforced not only by selecting add-ons but also by other options, and the solution seems a bit more complex)

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

3 participants