muhajirdev / gatsby-plugin-tailwindcss

Plug Tailwind CSS to your Gatsby website
https://www.npmjs.com/package/gatsby-plugin-tailwindcss
46 stars 3 forks source link

Tailwind v1 changed config file location #5

Open nigelb135 opened 5 years ago

nigelb135 commented 5 years ago

Tailwind v1 writes its config file to tailwind.config.js and the plugin complains that it cannot load the config.

I have temporarily solved this with a soft link for tailwind.js but I assume that there needs to be an update. Or maybe a configuration option.

nigelb135 commented 5 years ago

Sorry about bold "shouting" Unintentional side effect of cut-n-paste.

muhajirdev commented 5 years ago

This plugin uses https://github.com/bradlc/babel-plugin-tailwind-components/. And they recently released version that support v1 https://github.com/bradlc/babel-plugin-tailwind-components/releases . If you have time, a pull request is appreciated :)

nigelb135 commented 5 years ago

Seems no pull request required. Just needed to update tailwind.macro to alpha version and issue goes away

Thanks for your help

Nigel

muhajirdev commented 5 years ago

Ah, Thanks for letting me know :)

ovsw commented 5 years ago

I'm sorry but I don't understand what to upgrade to make this work. What is tailwind.macro and how do I update it? It's not a package I had installed when working with gatsby-plugin-tailwindcss so far. Really confused here.

m11m commented 5 years ago

@ovsw I think they mean, instead of gatsby-plugin-tailwindcss, use this --> https://github.com/bradlc/babel-plugin-tailwind-components/releases ... at least I have used that instead and seems to work so far.

jonny-harte commented 4 years ago

Hi, I just got this plugin and am still getting "can't resolve tailwind.js". Is this going to be fixed in this plugin or do I need to use babel-plugin-tailwind-components instead?

Zrce commented 3 years ago

Hi I have the same issue I think. @jonny-harte have you solved it? how?

jonny-harte commented 3 years ago

@Zrce nope I ended up using emotion-js instead.

muhajirdev commented 3 years ago

Hi guys,

I haven't updated this plugin for a while. I am just using tailwind with className right now. I am struggling with naming components. By just using className I don't have to name every single div.

https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss . This VScode plugin also really helpful

This plugin breaks when tailwind change their config from tailwind.config.js into tailwind.js And this plugin depends on babel-plugin-tailwind-components. I think they already support tailwind.js in their alpha version. Upgrading this repo depencices into v1.0.0-alpha.2 might solve the problem.

If you'd like to give it a try that would be very helpful. And plase make a pull request here afterward