-
Notifications
You must be signed in to change notification settings - Fork 492
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
Gridsome Tailwind Just-In-Time #1527
Comments
Looks like the compatibility dependencies are blocking this. I recently started using WindiCSS instead. So far so good. Just another option to try/consider depending on the needs of your project. https://gridsome.org/plugins/gridsome-plugin-windicss |
Strange, I'm not using I also had to add // gridsome.config.js
module.exports = {
...
css: {
loaderOptions: {
postcss: {
plugins: [
require("tailwindcss"),
require("autoprefixer"),
],
}
}
}
} Package versions: "gridsome": "^0.7.23",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"postcss": "^7",
"postcss-loader": "^4.0.0", |
What else did you have to do for getting tailwind + JIY to work? I am after all using WindiCss but I am just curious. |
@shumiyao I did just remember though, I'm have postcss disabled for now since JIT should only generate whats needed. The gridsome docs show how to setup purgecss for tailwind without using the plugin |
Thank you for your reply! I hope that gridsome gets a highly anticipated major update soon. |
I managed to put JIT to work with First, added to the module.exports = {
mode: 'jit',
// ...
// ...
}; Second, I added Please notice that they say This flag is a temporary workaround for incompatible tooling, and will eventually be removed in a future version of Tailwind CSS. Packages: "gridsome": "^0.7.23",
"gridsome-plugin-tailwindcss": "^4.1.1",
"postcss": "^7",
"tailwindcss": "npm:@tailwindcss/postcss7-compat", |
Description
Can't get Tailwind JIT properly working using
gridsome-plugin-tailwindcss
I know this isn't the plugins repo, but the plugin repo has issues tab disabled so I don't know where else to ask.
I've installed the plugin as described (using compatibility build) and it works fine until I try to add
mode: "jit"
intailwind.config.js
.JIT itself does work, classes like
pt-[20px]
are being applied, but only after I manually savetailwind.config.js
file. If I don't - add classes, save .vue file, reload browser - nothing happens until I save config file, then browser reloads and styles applies. Also, everything works fine if I delete classes - changes are applied automatically, but if classes are being added, then nothing happens.Is this expected behaviour (hopefully not)? What am I missing? Thanks a lot.`
Here's my Tailwind config file
The text was updated successfully, but these errors were encountered: