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
feat: upgrade to TailwindCSS 2 #203
Conversation
BREAKING CHANGE
Codecov Report
@@ Coverage Diff @@
## main #203 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 42 42
Branches 8 8
=========================================
Hits 42 42 Continue to review full report at Codecov.
|
Hi unfortunatelly, installing the compat version with
strangely enough I get this error on one machine and not on another. Node 14 installed in both. I also attempted this with no luck: https://tailwindcss.com/docs/installation#post-css-7-compatibility-build EDIT: this is related to the TailwindUI plugin apparently. when removing it, the problem is gone. |
const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
},
theme: {
extend: {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
},
},
variants: {
borderColor: ['responsive', 'hover', 'focus', 'active'],
...defaultTheme.variants,
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
require('@tailwindcss/aspect-ratio'),
],
purge: {
// Learn more on https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
enabled: process.env.NODE_ENV === 'production',
content: [
'components/**/*.vue',
'layouts/**/*.vue',
'pages/**/*.vue',
'plugins/**/*.js',
'nuxt.config.js',
],
},
}; I believe, you have to remove |
Thank you, do you mind opening a PR to update the docs please? :) |
Any progress on this next major release ? |
A pull request is ready to merge nuxt/nuxt#8591 which will include the changes required for this upgrade. I hope they will merge it somewhere between now and early next month. Is this draft ready to be merged and published as soon as nuxt 2.15 gets published? |
I will have to do testing for this @UltraCakeBakery but it is the plan yes. |
When is this upgrade going to be merged or is there another way for me to upgrade to v2 on tailwindcss. Great work in the nuxt community. |
@hoektoe there is remaining work to be merged on other related project before it can be merged (take a look on related PR above). You can already use Tailwind 2 in your project, take a look at: https://tailwindcss.nuxtjs.org/setup#tailwind-2
|
Yes : https://tailwindcss.nuxtjs.org/setup#upgrading-tailwind
|
Awesome , sorry I misread the docs for that section. |
coming soon ? :) |
Nuxt v2.15 is out! |
@@ -28,7 +28,7 @@ | |||
"consola": "^2.15.0", | |||
"defu": "^3.2.2", | |||
"fs-extra": "^9.0.1", | |||
"tailwindcss": "^1.9.6" | |||
"tailwindcss": "^2.0.1-compat" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the upgrade to nuxt 2.15, will we still need to depend on the compat version of tailwindcss?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't. Please upgrade tailwindcss to 2.0.3
Once the rest of your tools have added support for PostCSS 8, you can move off of the compatibility build by re-installing Tailwind and its peer-dependencies using the latest tag:
Will work on it ASAP |
@Atinux |
WindiCSS could be an add-on and not a replacement for pure tailwindcss imho |
Indeed, it could be an option for the module (like windi: true). No idea I have to test it. Any feedback or sandboxes with it is more than welcome |
soon ? |
Looking at it next week, was recording my talk for Nuxt 3 and VueJS Amsterdam this week. Welcome to open source |
Super psyched about Nuxt 3! |
Eagerly waiting! |
nuxt/nuxt#8591 everything is fine, go ahead. |
Is it coming already? Need this urgently |
To all impatient : Don't forget that we all have 24h in a day. No more. So, just, be patient. Note that you can already use Tailwind 2 in your project, take a look at: https://tailwindcss.nuxtjs.org/setup#tailwind-2
|
In addition to the comment above there is already a beta out for the upcoming major version 4.0.0 ( |
I get where you come from and I agree with anyone that thinks we should never expect anything from open source project maintainers. But above the author says that the plan was to release this when nuxt 2.15 came out. It didn't, so he moved it to "next week", which was 3 weeks ago now. People are not impatient, they are rightfully done waiting. Not all of us get away with dropping in a beta build or injecting dependencies manually. Some teams/companies have (high) standards. |
Hi, you can hit the "fork" button and submit a PR. That way, you will provide high standards to everybody here and get a lot of love coming from us. 🤗 |
Another PR that bump Tailwind to version 2 has been merged. ➡️ #270 |
Maybe i'm impatient, but not gracefully person, we need to understand open source projects always needs brave people, so i don't think what: people business/business company side is more important or great than people involved in projects, specially open source projects, "everbody need time" - is a good phrase. Make love not war, thanks for great job. ❤ |
Version 4 is out 🎊 https://github.com/nuxt-community/tailwindcss-module/releases/tag/v4.0.0 |
Thank you so much for all the efforts you guys put into improving Nuxt and its modules. ❤🤗 |
Awesome work guys, thank you so much for all the effort |
This PR is a breaking change since TailwindCSS 2 introduced breaking changes, see https://blog.tailwindcss.com/tailwindcss-v2 and https://tailwindcss.com/docs/upgrading-to-v2#upgrade-to-node-js-12-13-or-higher
Since it does not support Node < 12.13 we have to release this module as version 4 and forcing
node >= 12.3.0
.Nuxt 2.14 is still running PostCSS 7 since we supports Node 8, we have a PR to drop support for it but will still support Node 10, see nuxt/nuxt#8346 and nuxt/nuxt#8408
When Nuxt 2.15 will be out, I will update to
tailwindcss@latest
directly and release the version 4 of this module.In the meantime I updated the documentation to explain how to upgrade to
tailwindcss@compat
: https://tailwindcss.nuxtjs.org/setup#tailwind-2Resolves #202