-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostcss.config.mjs
More file actions
35 lines (31 loc) · 1.13 KB
/
postcss.config.mjs
File metadata and controls
35 lines (31 loc) · 1.13 KB
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
30
31
32
33
34
35
// /** @type {import('postcss-load-config').Config} */
// const config = {
// plugins: {
// "@tailwindcss/postcss": {},
// // "postcss-rename": {
// // strategy: "minimal",
// // by: "whole",
// // except: ["mt-4", "p-2"], // Protect Tailwind classes
// // outputMapCallback: (map) => console.log("Renamed classes:", map),
// // },
// },
// }
// export default config
/** @type {import('postcss-load-config').Config} */
import { writeFileSync } from "fs" // Import Node.js fs module to write files
const config = {
plugins: {
"@tailwindcss/postcss": {},
// "postcss-rename": {
// strategy: "minimal", // Rename classes to shortest possible names (e.g., .a, .b)
// by: "part", // Rename part of class names (e.g., .tall-image -> .a)
// except: ["mt-4", "p-2"], // Protect Tailwind classes
// outputMapCallback: (map) => {
// // Write the renaming map to class-map.json
// writeFileSync("class-map.json", JSON.stringify(map, null, 2), "utf8")
// console.log("Class map saved to class-map.json:", map)
// },
// },
},
}
export default config