question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tailwind class content does not render in nested Lerna packages

See original GitHub issue

Hey, I need some help to improve my design-system project. so I added Lerna for management multi-app in nuxt also use @nuxtjs/tailwindcss. in Lerna config and nuxt config everything is ok but when use tailwind CSS for my component design class content doesn’t know tailwind although tailwind CSS works fine.

"@nuxtjs/tailwindcss": "^4.2.1" see my directory

image

see my loaded component

image

and the result

image

in the last image, you can see doesn’t load class tailwind.

thank you for your time.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:12

github_iconTop GitHub Comments

3reactions
davodaslanifakorcommented, Jan 17, 2022

I found the solution for this version of tailwind set purge content like this

purge:{
    content: [
      "../../node_modules/@xxx-front/design-system/**/*.{js,vue,ts}"
   ]
}

and tailwind in nuxt.config add

  tailwindcss: {
    jit: true,
    cssPath: '../config/tailwind/tailwind.scss',
    configPath: './tailwind.config.js',
  },

tailwind.scss content

@tailwind base;
@tailwind components;
@tailwind utilities;

I find this option in content version +3 tailinwd.css and move into nuxt/tailwind by purge content. In fact, tailwind need this patch to find and watch code in content for compile

3reactions
soroushJulycommented, Jan 12, 2022

I’ve the same problem. Tailwind classes won’t work in my external components which I’ve imported to my project folders.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tailwind class content does not render in nested Lerna packages
Hey, I need some help to improve my design-system project. so I added Lerna for management multi-app in nuxt also use @nuxtjs/tailwindcss.
Read more >
tailwind class content does not render in nested Lerna packages
in Lerna config and nuxt config everything is ok but when use tailwind CSS for my component design class content doesn't know tailwind...
Read more >
Tailwind CSS code completion doesn't work if package.json ...
You've got it right, the Tailwind CSS plugin is designed to work only in files within the node project with dependency on tailwndcss...
Read more >
React Monorepo Using Yarn Workspaces Only (No Lerna)
I was looking to convert one of my GitHub repos to hopefully become a monorepo. I did a little research and found out...
Read more >
Setup a Monorepo with PNPM workspaces and speed it up ...
In this article we're going to have a deep dive into setting up a new monorepo using PNPM workspaces that hosts a Remix...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found