Getting Compile Error When Adding @tailwindcss/ui Plugin to tailwind.config.js #1638
roberttravispierce
started this conversation in
General
Replies: 4 comments 1 reply
-
Here's my postcss.config.js file: let environment = {
plugins: [
require('tailwindcss')('app/javascript/stylesheets/tailwind.config.js'),
require('autoprefixer'),
require('postcss-import'),
require('postcss-flexbugs-fixes'),
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009'
},
stage: 3
}),
]
}
if (process.env.RAILS_ENV === "production" || process.env.RAILS_ENV === "staging") {
// A whitelist of css classes to keep that might not be found in the app
function collectWhitelist() {
return ['font-serif', 'tab-active', 'transition', 'text-gray-400', 'bg-twitter', 'bg-facebook', 'bg-google_oauth2', 'text-twitter', 'text-facebook', 'text-google_oauth2', 'video-js'];
}
environment.plugins.push(
require('@fullhuman/postcss-purgecss')({
content: ['./**/*.html.erb', './**/*.html.haml', './app/helpers/**/*.rb'],
defaultExtractor: content => content.match(/[\w-/.:]+(?<!:)/g) || [],
whitelist: collectWhitelist(),
whitelistPatterns: [/^vjs-/],
whitelistPatternsChildren: [/trix/, /attachment/, /tribute/, /tippy/],
})
)
}
module.exports = environment |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm having the same issue |
Beta Was this translation helpful? Give feedback.
1 reply
-
Make sure you are on the latest version of Tailwind 👍🏻 Sounds like maybe you are on an older version that is missing a variant that Tailwind UI expects. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have run into this issue as well and @adamwathan's reply didn't work for me. https://github.com/grshane/p2stencil |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm adding TailwindUI to my project. I followed the documentation, brought in an example form, and added the CDN version just to do a quick check—All went well. Then moved on to adding the @tailwindcss/ui plugin to my tailwind.config.js file, instead of the CDN. Now I'm getting a compile error:
Here's my tailwind.config.js file:
I can't figure out what's going on. I've come up empty with the normal googling & troubleshooting rodeo (reinstalling all node_modules, etc.)
Help?
Beta Was this translation helpful? Give feedback.
All reactions