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

esbuild plug-ins postcss / tailwindcss not working #229

Open
emkayy opened this issue Apr 21, 2024 · 0 comments
Open

esbuild plug-ins postcss / tailwindcss not working #229

emkayy opened this issue Apr 21, 2024 · 0 comments

Comments

@emkayy
Copy link

emkayy commented Apr 21, 2024

I tried adding tailwind through an esbuild plug-in in various different ways. However, it seems like the plug-ins are never initiated.
This is my build-figma-plugin.main.js:

const { tailwindPlugin } = require("esbuild-plugin-tailwindcss");
const postcss = require("esbuild-postcss");

module.exports = function (buildOptions) {
  const config = {
    ...buildOptions,
    plugins: [...buildOptions.plugins, postcss() /* tailwindPlugin() */],
  };
  return config;
};

I also tried passing the plugin config directly:

plugins: [
    postcss({
      plugins: [
        tailwindcss('./tailwind.config.js'), // also tried without config path and passing config object
      ],
    }),
  ],

Here is a minimal setup
tailwindpostcss.zip

Is there a special way you have to add / configure esbuild plug-ins?

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

1 participant