Skip to content

Instantly share code, notes, and snippets.

@DanOliverBC
Created March 5, 2020 16:55
Show Gist options
  • Save DanOliverBC/40a04cb261f9effbea1fa3e36e2169df to your computer and use it in GitHub Desktop.
Save DanOliverBC/40a04cb261f9effbea1fa3e36e2169df to your computer and use it in GitHub Desktop.
Using tailwind css with buefy/bulma classes
const path = require("path");
const purgecss = require("@fullhuman/postcss-purgecss")({
// Specify the paths to all of the template files in your project
content: [
"./src/**/*.html",
"./src/**/*.vue",
path.join(__dirname, "./node_modules/buefy/**/*.@(vue|js)")
// etc.
],
whitelistPatterns: [/^navbar-/, /^has-text-/, /^fa-/, /^has-numberinput-/],
// Include any special characters you're using in this regular expression
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
});
module.exports = {
plugins: [
require("tailwindcss"),
require("autoprefixer"),
...(process.env.NODE_ENV === "production" ? [purgecss] : [])
]
};
@408796571
Copy link

Could you provide an update on how to use tailwindcss for buefy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment