2

Currently, I have my tailwind.config.js set up to scan for files that contain tailwind class names.

module.exports = {
  mode: "jit",
  content: ["**/*.razor", "**/*.cshtml", "**/*.html", "**/*.razor.css"],
  theme: {},
  variants: {},
  plugins: [],
}

I am trying to reference the components in my RCL which also contain tailwind classes so I can generate one CSS file.

I have already tried to work with two CSS files and configs. One for the Blazor project and the other for the RCL. But as a results, I get both the CSS files overriding each other on certain components.

But since RCLs get compiled into DLLs I have no clue where to start to reference the RCL components for tailwindcss to scan.

1 Answer 1

1
+50

Add the path to your Razor Class Library (RCL) in Tailwind content directly, if you haven't done it already

module.exports = {
  mode: "jit",
  content: [
    "**/*.razor",
    "**/*.cshtml",
    "**/*.html",
    "**/*.razor.css",
    "PATH/TO/RCL/components/**/*"
  ],
  theme: {},
  variants: {},
  plugins: [],
}
Sign up to request clarification or add additional context in comments.

1 Comment

Would this work with a relative path?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.