generated from joekrump/modern-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostcss.config.js
More file actions
29 lines (24 loc) · 816 Bytes
/
postcss.config.js
File metadata and controls
29 lines (24 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// postcss.config.js
const tailwindcss = require("tailwindcss");
const purgecss = require("@fullhuman/postcss-purgecss")({
// Specify the paths to all of the template files in your project
content: ["./frontend/**/*.svelte", "./app/views/**/*.html.erb"],
whitelistPatterns: [/svelte-/],
// Include any special characters you're using in this regular expression
defaultExtractor: (content) => content.match(/[\w-/.:]+(?<!:)/g) || [],
});
module.exports = {
plugins: [
tailwindcss("./tailwind.config.js"),
require("autoprefixer"),
require("postcss-import"),
require("postcss-flexbugs-fixes"),
require("postcss-preset-env")({
autoprefixer: {
flexbox: "no-2009",
},
stage: 3,
}),
...(process.env.NODE_ENV == "production" ? [purgecss] : []),
],
};