mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 23:54:48 +01:00
(chore) Add support for .scss and tailwindcss
This commit is contained in:
25
cfg/postcss.config.ts
Normal file
25
cfg/postcss.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import tailwind from "tailwindcss";
|
||||
import autoprefixer from "autoprefixer";
|
||||
import cssnanoPlugin from "cssnano";
|
||||
|
||||
import tailwindConfig from "./tailwind.config";
|
||||
const mode = process.env.NODE_ENV;
|
||||
const dev = mode === "development";
|
||||
|
||||
export default {
|
||||
plugins: (() => {
|
||||
let plugins = [
|
||||
// Some plugins, like TailwindCSS/Nesting, need to run before Tailwind.
|
||||
tailwind(tailwindConfig),
|
||||
|
||||
// But others, like autoprefixer, need to run after.
|
||||
autoprefixer()
|
||||
];
|
||||
|
||||
!dev && cssnanoPlugin({
|
||||
preset: "default"
|
||||
});
|
||||
|
||||
return plugins;
|
||||
})()
|
||||
};
|
||||
11
cfg/tailwind.config.ts
Normal file
11
cfg/tailwind.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Config } from "tailwindcss";
|
||||
|
||||
export default {
|
||||
content: ["./src/**/*.{html,js,tsx,ts}"],
|
||||
mode: "jit",
|
||||
theme: {
|
||||
extend: {}
|
||||
},
|
||||
darkMode: "class",
|
||||
plugins: []
|
||||
} as Config;
|
||||
Reference in New Issue
Block a user