Skip to content
Discussion options

You must be logged in to vote

but if I want v4 I'd have this: "style": "new-york-v4"

No keep it as-is --> new-york

shadcn-vue CLI FALLBACK_STYLE is new-york-v4

function resolveStyleFromConfig(config: Partial<Config> | Config) {
  if (!config.style) {
    return FALLBACK_STYLE
  }

  // Check if we should use new-york-v4 for Tailwind v4.
  // We assume that if tailwind.config is empty, we're using Tailwind v4.
  if (config.style === "new-york" && config.tailwind?.config === "") {
    return FALLBACK_STYLE
  }

  return config.style
}

based on the code

  • if there is no style in components.json file, fallback to new-york-v4

  • if the style value is new-york and tailwind['config'] is empty, also fallback to new-york-v4

  • i…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@gespinha
Comment options

@sadeghbarati
Comment options

@gespinha
Comment options

@sadeghbarati
Comment options

Answer selected by gespinha
@gespinha
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants