Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

classNameReplacer not working for me #167

Open
niklasgrewe opened this issue Apr 27, 2021 · 1 comment
Open

classNameReplacer not working for me #167

niklasgrewe opened this issue Apr 27, 2021 · 1 comment

Comments

@niklasgrewe
Copy link

Hi, thanks for this plugin.
I want to use the classNameReplacer in my NextJS App, but it doesn't work for me. I configure the plugin like this:

module.exports = {
  plugins: [
    require('tailwindcss-pseudo-elements')({
      emptyContent: true,
      classNameReplacer: {
        'hover:before:text-black': 'hbt',
      },
    }),
  ],
}

🚫 doesn't work

<div className="hbt">My Container</div>

✅ it works

<div className="hover:before:text-black">My Container</div>

So where is my mistake?

@croutonn
Copy link
Owner

croutonn commented Apr 27, 2021

Hi, @niklasgrewe

The configuration looks fine.
If hover: before: text-black works, I think the configuration of variants has no problem.

However, I just added a test case and ran the test, and it works as expected.

Is it possible that the version of this plugin is old, or is it possible that other plugins are interfering .... I don't quite understand the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants