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

Using Tailwind Plugins within Tailwind.js #41

Open
NikkiJonesR opened this issue Sep 26, 2019 · 0 comments
Open

Using Tailwind Plugins within Tailwind.js #41

NikkiJonesR opened this issue Sep 26, 2019 · 0 comments

Comments

@NikkiJonesR
Copy link

Hi there,

Is it possible to load tailwind plugins and use them within my styled components?

For instance something like this?

// babel-plugin-macros.config.js
module.exports = {
  tailwind: {
    config: './tailwind.js',
    format: 'auto',
    plugins: [
      require('./src/tailwind-custom-plugins/my-tailwind-plugin.js')
    ],
  }
}

And in my tailwind.js:

...  
/*
  |-----------------------------------------------------------------------------
  | Plugins                                https://tailwindcss.com/docs/plugins
  |-----------------------------------------------------------------------------
  |
  | Here is where you can register any plugins you'd like to use in your
  | project. Tailwind's built-in `container` plugin is enabled by default to
  | give you a Bootstrap-style responsive container component out of the box.
  |
  | Be sure to view the complete plugin documentation to learn more about how
  | the plugin system works.
  |
  */

  plugins: [
    require('./src/tailwind-custom-plugins/my-tailwind-plugin.js')(),
  ],

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