You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run my trunk serve --config packages/ui/Trunk.toml from the root directory of my workspace (.). However, the trunk command does not find any tailwind CSS class names; I see the following output:
$ trunk serve --config packages/ui/Trunk.toml -vRebuilding...warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.warn - https://tailwindcss.com/docs/content-configuration
// tailwind.config.js/** @type {import('tailwindcss').Config} */module.exports={content: {files: ["*.html","./src/**/*.rs"],// `.rs` files since I use `leptos` (a Rust-based UI framework)transform: {rs: (content)=>content.replace(/(?:^|\s)class:/g,' ')// similar to Svelte conditional class attributes: `class:some-key=<bool-value>`}},theme: {extend: {},},plugins: [],// plugins: [require('@tailwindcss/forms')],};
Question:
How can I make trunk aware of the tailwindcss classes inside my source code? It doesn't find them even though I think I configured them properly. I think the issue is the working directory is the root of my workspace, and thus the relative file paths don't resolve properly.
How can I make tailwind aware that the ui-feature-* packages also contain tailwind css and that it should scan for them, too?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using
leptos
as my UI framework, but this should apply to any UI stack that allows one to split up projects into smaller parts.My directory structure looks like this:
I run my
trunk serve --config packages/ui/Trunk.toml
from the root directory of my workspace (.
). However, the trunk command does not find any tailwind CSS class names; I see the following output:My configuration files are:
Question:
How can I make
trunk
aware of the tailwindcss classes inside my source code? It doesn't find them even though I think I configured them properly. I think the issue is the working directory is the root of my workspace, and thus the relative file paths don't resolve properly.How can I make tailwind aware that the
ui-feature-*
packages also contain tailwind css and that it should scan for them, too?Beta Was this translation helpful? Give feedback.
All reactions