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

postcss.config.cjs as ESM module #24

Closed
thiccnfun opened this issue Mar 10, 2024 · 1 comment
Closed

postcss.config.cjs as ESM module #24

thiccnfun opened this issue Mar 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@thiccnfun
Copy link

thiccnfun commented Mar 10, 2024

This isn't so much an issue, but something I wanted to share here.

Longer story short, I was having a hard time getting the postcss-remove-class plugin to work with the way postcss.config.cjs was defined.

This ESM approach worked better for me (renamed as postcss.config.js):

import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import postcssRemoveClasses from 'postcss-remove-classes';

export default {
  plugins: [
    tailwindcss(),
    autoprefixer(),
    postcssRemoveClasses.default('range'),
  ],
}

There may be a solution using the previous format of the file, but I wasn't finding the approach very intuitive 🤷

@theelims theelims added the enhancement New feature or request label Apr 1, 2024
@theelims
Copy link
Owner

Made this the standard way for next release

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

No branches or pull requests

2 participants