msbuild-tailwindcss icon indicating copy to clipboard operation
msbuild-tailwindcss copied to clipboard

the result .min.css file is only 4kb in size and does not work

Open razfazz opened this issue 4 years ago • 5 comments

Thank you for providing that package. Not having to use a package.json is a huge benefit. Unfortunately it does not work in my case because the system builds a styles.min.css file which does not have the needed classes. is it possible that the tailwind config does not support .cshtml files?

razfazz avatar Mar 22 '22 10:03 razfazz

Facing the same issue. It builds the .min.css but it's a 4kb file with no styles.

pavloss avatar Mar 31 '22 14:03 pavloss

Is it possible that you provide an example project?

BamButz avatar Apr 01 '22 06:04 BamButz

Is it possible that you provide an example project?

Thanks for your response. I set up a small project that contains the issue at https://github.com/pavloss/tailwind . Hopefully it's helpful.

pavloss avatar Apr 01 '22 08:04 pavloss

Okay, this is a configuration problem. I will have to update the default configuration to fix this for new projects.

You will have to make the following changes to your configuration (tailwind.config.js):

  • Remove "purge" field
  • Add content field (e.g. content: ["./**/*.{cshtml,js}"])

I hope this helps you.

BamButz avatar Apr 01 '22 13:04 BamButz

Thanks @BamButz , very helpful indeed!

pavloss avatar Apr 04 '22 14:04 pavloss