bennypowers / lit-css

Build Plugins for CSS tagged-template-literals
MIT License
47 stars 7 forks source link

Unable to perform just-in-time compilation of Tailwind CSS #37

Closed ouweiya closed 1 year ago

ouweiya commented 1 year ago

Compiles only at startup, watch mode does not compile just-in-time, is just-in-time compilation not supported?

Project configuration:

import litcss from 'rollup-plugin-lit-css';
import postcssConfig from 'postcss-load-config';
const config = await postcssConfig();

plugins: [
  litcss({ transform: (css, { filePath }) => postcss(config.plugins).process(css, { from: filePath }).css }),
]

postcss.config.js

import tailwindcss from 'tailwindcss';
export default {
  plugins: [tailwindcss],
};
bennypowers commented 1 year ago

Thanks for the issue. I'm not a tailwind user and frankly cannot recommend it, so to set expectations: I'm not interested in maintaining support for tailwind, but I would review a sufficiently documented PR, including comprehensive test and repro. I would not commit to supporting that feature through breaking changes to tailwind.

ouweiya commented 1 year ago

Thank you for your fast reply. At first, I thought there was a problem with my configuration. Now, I plan to cook for myself, and your code repository has provided me with much inspiration. Thank you.