svengau / tailwindcss-hero-patterns

A simple tailwind plugin to display Hero Patterns by @steveschoger.
95 stars 6 forks source link

Version 0.1.0 not working #7

Closed AlexMNet closed 1 year ago

AlexMNet commented 1 year ago

Hi! First off thank you for creating this project! I have used it in a previous application and now implementing it in a new one.

I realized when installing that there was a new version 0.1.0 which is not currently working for me.

 "dependencies": {
    "@headlessui/react": "^1.7.11",
    "@headlessui/tailwindcss": "^0.1.2",
    "@heroicons/react": "^2.0.16",
    "@next/font": "13.1.6",
    "eslint": "8.34.0",
    "eslint-config-next": "13.1.6",
    "next": "13.1.6",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-player": "^2.11.2",
    "tailwindcss-hero-patterns": "^0.1.0"
  },
  "devDependencies": {
    "autoprefixer": "^10.4.13",
    "eslint-config-prettier": "^8.6.0",
    "eslint-plugin-prettier": "^4.2.1",
    "postcss": "^8.4.21",
    "prettier": "^2.8.4",
    "prettier-plugin-tailwindcss": "^0.2.3",
    "tailwindcss": "^3.2.7"
  }

It does work when I install the previous version 0.0.1. Any clue what could be going on here? Thank you!

svengau commented 1 year ago

Thanks for reporting this @AlexMNet. I can reproduce the issue too. V0.0.2 works fine (here is a playground link)

@pySilver it seems this issue has been introduced with #6. Did you get a chance to test it ?

pySilver commented 1 year ago

@svengau at the moment I'm still using my fork version and it works just fine. Do you see any errors or it is simply not generating anything? Does it work with something like heropattern-foo-red-100/50 ?

pySilver commented 1 year ago

Oh. My bad. I've accidentally changed base class prefix name from 'heropattern' to 'pattern' and committed it like that. This is the issue here.

svengau commented 1 year ago

@pySilver do you mind pushing a PR to fix it ? thx

pySilver commented 1 year ago

@svengau #8 here it is :)

AlexMNet commented 1 year ago

@svengau @pySilver just reading all this now. Thank you both for your prompt work on this issue!

svengau commented 1 year ago

I've just published a new version.

Also, I've introduced a new params heroPatternsOpacities with default to ['10', '50', '90'], to optimize the load (it wasn't loading properly in the tailwind css playground).

pySilver commented 1 year ago

@svengau out of curiosity: Is that needed for development mode for some reason? I don't see any unwanted classes being generated thanks to JIT. (Maybe its been generated, but cleared at the very end, I've never actually looked into internal JIT logic)