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

turbo/examples/with-tailwind tailwind prefix ("ui-") not working without building ui lib #5755

Closed
mule-stand opened this issue Aug 19, 2023 · 2 comments
Assignees
Labels
area: examples Improvements or additions to examples owned-by: turborepo

Comments

@mule-stand
Copy link

mule-stand commented Aug 19, 2023

What version of Turborepo are you using?

latest

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Describe the Bug

It`s not working https://github.com/vercel/turbo/tree/main/examples/with-tailwind#building-packagesui
Without assembly, the prefix for the ui library does not rebate and as a consequence styles are not applied when using the prefix in className

Expected Behavior

Prefixes must be worked

To Reproduce

  1. Uncomment line https://github.com/vercel/turbo/blob/b1b74d78de1d1a6d8dce9f1f98e768c8274023f2/examples/with-tailwind/packages/tailwind-config/tailwind.config.js#L8
  2. This https://github.com/vercel/turbo/blob/b1b74d78de1d1a6d8dce9f1f98e768c8274023f2/examples/with-tailwind/packages/ui/package.json#L8C3-L11C5 replace by this:
 "exports": {
    ".": "./src/index.tsx",
    "./styles.css": "./src/styles.css"
  }

Reproduction Repo

No response

@mule-stand mule-stand added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels Aug 19, 2023
@chris-olszewski chris-olszewski added area: examples Improvements or additions to examples and removed kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Aug 22, 2023
@tknickman
Copy link
Member

This is fixed as part of #5912

@tknickman tknickman self-assigned this Sep 11, 2023
@JKarlavige
Copy link

Hey @tknickman, i'm running into the same issue. When not bundling the UI package, the Tailwind prefixes do not work. In VSCode, it picks up the ui- prefix which I have set in the ui package's tailwind.config.js:

import sharedConfig from 'web-tailwind'

const config = {
  presets: [sharedConfig],
  prefix: 'ui-',
}

image

However, when importing a component into an app, the prefix classes are not applied. I've spent the day looking into it and haven't figured out a solution. Is this not possible without bundling the ui package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples owned-by: turborepo
Projects
None yet
Development

No branches or pull requests

4 participants