From 1b0f1a2269c5061d77dcb0a0d9f4c4222eea510e Mon Sep 17 00:00:00 2001 From: hypercross Date: Thu, 26 Feb 2026 08:14:42 +0800 Subject: [PATCH] fix: postcss --- package-lock.json | 30 ++++++++++++++++++++++++++++-- package.json | 1 + rsbuild.config.ts | 10 +++++----- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5999fc..a61a6d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "@rsbuild/core": "^1.1.8", "@rsbuild/plugin-babel": "^1.1.0", "@rsbuild/plugin-solid": "^1.0.7", + "@tailwindcss/postcss": "^4.2.1", "@tailwindcss/typography": "^0.5.15", "@tailwindcss/vite": "^4.0.0", "@types/node": "^22.10.2", @@ -32,6 +33,19 @@ "typescript": "^5.7.2" } }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@babel/code-frame": { "version": "7.29.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", @@ -2059,6 +2073,20 @@ "node": ">= 20" } }, + "node_modules/@tailwindcss/postcss": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.2.1.tgz", + "integrity": "sha512-OEwGIBnXnj7zJeonOh6ZG9woofIjGrd2BORfvE5p9USYKDCZoQmfqLcfNiRWoJlRWLdNPn2IgVZuWAOM4iTYMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "@tailwindcss/node": "4.2.1", + "@tailwindcss/oxide": "4.2.1", + "postcss": "^8.5.6", + "tailwindcss": "4.2.1" + } + }, "node_modules/@tailwindcss/typography": { "version": "0.5.19", "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz", @@ -2997,7 +3025,6 @@ } ], "license": "MIT", - "peer": true, "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3066,7 +3093,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", diff --git a/package.json b/package.json index 02233ee..84913ec 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@rsbuild/core": "^1.1.8", "@rsbuild/plugin-babel": "^1.1.0", "@rsbuild/plugin-solid": "^1.0.7", + "@tailwindcss/postcss": "^4.2.1", "@tailwindcss/typography": "^0.5.15", "@tailwindcss/vite": "^4.0.0", "@types/node": "^22.10.2", diff --git a/rsbuild.config.ts b/rsbuild.config.ts index ff8e09e..a9c3c5d 100644 --- a/rsbuild.config.ts +++ b/rsbuild.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from '@rsbuild/core'; import { pluginBabel } from '@rsbuild/plugin-babel'; import { pluginSolid } from '@rsbuild/plugin-solid'; -import tailwindcss from '@tailwindcss/vite'; +import tailwindcss from '@tailwindcss/postcss'; export default defineConfig({ plugins: [ @@ -11,10 +11,10 @@ export default defineConfig({ pluginSolid(), ], tools: { - vite: { - plugins: [ - tailwindcss(), - ], + postcss: { + postcssOptions: { + plugins: [tailwindcss()], + }, }, }, html: {