Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
grasscutters
GitHub Repository: grasscutters/grasscutter
Path: blob/development/src/handbook/cfg/postcss.config.js
3159 views
1
import tailwind from "tailwindcss";
2
import autoprefixer from "autoprefixer";
3
import cssnanoPlugin from "cssnano";
4
5
import tailwindConfig from "./tailwind.config.js";
6
const mode = process.env.NODE_ENV;
7
const dev = mode === "development";
8
9
export default {
10
plugins: (() => {
11
let plugins = [
12
// Some plugins, like TailwindCSS/Nesting, need to run before Tailwind.
13
tailwind(tailwindConfig),
14
15
// But others, like autoprefixer, need to run after.
16
autoprefixer()
17
];
18
19
!dev && cssnanoPlugin({
20
preset: "default"
21
});
22
23
return plugins;
24
})()
25
}
26
27