Created
March 5, 2020 16:55
-
-
Save DanOliverBC/40a04cb261f9effbea1fa3e36e2169df to your computer and use it in GitHub Desktop.
Using tailwind css with buefy/bulma classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] : []) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you provide an update on how to use tailwindcss for buefy?