build: postcss plugins

This commit is contained in:
OLIMINATOR 2023-01-06 20:38:58 +01:00
parent 1f4e924ae9
commit e4e3f8b223
4 changed files with 1162 additions and 1 deletions

View file

@ -1,6 +1,5 @@
import { defineConfig } from "astro/config"; import { defineConfig } from "astro/config";
// https://astro.build/config
import tailwind from "@astrojs/tailwind"; import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap"; import sitemap from "@astrojs/sitemap";
import image from "@astrojs/image"; import image from "@astrojs/image";

1143
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -16,6 +16,8 @@
"@astrojs/tailwind": "^2.1.3", "@astrojs/tailwind": "^2.1.3",
"@astrojs/vercel": "^2.4.0", "@astrojs/vercel": "^2.4.0",
"astro": "^1.9.0", "astro": "^1.9.0",
"autoprefixer": "^10.4.13",
"cssnano": "^5.1.14",
"tailwindcss": "^3.2.4" "tailwindcss": "^3.2.4"
} }
} }

17
postcss.config.cjs Normal file
View file

@ -0,0 +1,17 @@
const tailwindcss = require("tailwindcss");
const autoprefixer = require("autoprefixer");
const cssnano = require("cssnano");
const mode = process.env.NODE_ENV;
const dev = mode === "development";
module.exports = {
plugins: [
tailwindcss,
autoprefixer,
!dev &&
cssnano({
preset: "default",
}),
],
};