From 50210e25e8c613862db8b0dfcb49751a9709f675 Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 14 Oct 2025 03:14:38 +0800 Subject: [PATCH] Add @tailwindcss/typography plugin and fix Tailwind config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Add typography plugin dependency • Fix plugin imports in config • Add source paths to CSS --- lightrag_webui/bun.lock | 9 +++++++++ lightrag_webui/package.json | 1 + lightrag_webui/src/index.css | 3 +++ lightrag_webui/tailwind.config.js | 11 ++++------- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lightrag_webui/bun.lock b/lightrag_webui/bun.lock index aa04a4ee..661837c4 100644 --- a/lightrag_webui/bun.lock +++ b/lightrag_webui/bun.lock @@ -71,6 +71,7 @@ "devDependencies": { "@eslint/js": "^9.37.0", "@stylistic/eslint-plugin-js": "^3.1.0", + "@tailwindcss/typography": "^0.5.15", "@tailwindcss/vite": "^4.1.14", "@types/bun": "^1.2.23", "@types/katex": "^0.16.7", @@ -471,6 +472,8 @@ "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.1.14", "", { "os": "win32", "cpu": "x64" }, "sha512-ttblVGHgf68kEE4om1n/n44I0yGPkCPbLsqzjvybhpwa6mKKtgFfAzy6btc3HRmuW7nHe0OOrSeNP9sQmmH9XA=="], + "@tailwindcss/typography": ["@tailwindcss/typography@0.5.19", "", { "dependencies": { "postcss-selector-parser": "6.0.10" }, "peerDependencies": { "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" } }, "sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg=="], + "@tailwindcss/vite": ["@tailwindcss/vite@4.1.14", "", { "dependencies": { "@tailwindcss/node": "4.1.14", "@tailwindcss/oxide": "4.1.14", "tailwindcss": "4.1.14" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7" } }, "sha512-BoFUoU0XqgCUS1UXWhmDJroKKhNXeDzD7/XwabjkDIAbMnc4ULn5e2FuEuBbhZ6ENZoSYzKlzvZ44Yr6EUDUSA=="], "@tanstack/react-table": ["@tanstack/react-table@8.21.3", "", { "dependencies": { "@tanstack/table-core": "8.21.3" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-5nNMTSETP4ykGegmVkhjcS8tTLW6Vl4axfEGQN3v0zdHYbK4UfoqfPChclTrJ4EoK9QynqAu9oUf8VEmrpZ5Ww=="], @@ -717,6 +720,8 @@ "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + "cssesc": ["cssesc@3.0.0", "", { "bin": { "cssesc": "bin/cssesc" } }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="], + "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], "cytoscape": ["cytoscape@3.31.2", "", {}, "sha512-/eOXg2uGdMdpGlEes5Sf6zE+jUG+05f3htFNQIxLxduOH/SsaUZiPBfAwP1btVIVzsnhiNOdi+hvDRLYfMZjGw=="], @@ -1381,6 +1386,8 @@ "postcss": ["postcss@8.5.3", "", { "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A=="], + "postcss-selector-parser": ["postcss-selector-parser@6.0.10", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w=="], + "prelude-ls": ["prelude-ls@1.2.1", "", {}, "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="], "prettier": ["prettier@3.6.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="], @@ -1617,6 +1624,8 @@ "use-sidecar": ["use-sidecar@1.1.3", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="], + "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], + "uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="], "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], diff --git a/lightrag_webui/package.json b/lightrag_webui/package.json index 85228ce1..e2891a7f 100644 --- a/lightrag_webui/package.json +++ b/lightrag_webui/package.json @@ -87,6 +87,7 @@ "@types/bun": "^1.2.23", "@types/katex": "^0.16.7", "@types/node": "^22.18.9", + "@tailwindcss/typography": "^0.5.15", "@types/react": "^19.2.2", "@types/react-dom": "^19.2.1", "@types/react-i18next": "^8.1.0", diff --git a/lightrag_webui/src/index.css b/lightrag_webui/src/index.css index ec8613da..2ddfdccd 100644 --- a/lightrag_webui/src/index.css +++ b/lightrag_webui/src/index.css @@ -3,6 +3,9 @@ @plugin 'tailwindcss-animate'; @plugin 'tailwind-scrollbar'; +@source '../index.html'; +@source './**/*.{ts,tsx}'; + @custom-variant dark (&:is(.dark *)); :root { diff --git a/lightrag_webui/tailwind.config.js b/lightrag_webui/tailwind.config.js index 7ace7890..8ad75b29 100644 --- a/lightrag_webui/tailwind.config.js +++ b/lightrag_webui/tailwind.config.js @@ -1,3 +1,6 @@ +import tailwindcssAnimate from 'tailwindcss-animate' +import typography from '@tailwindcss/typography' + /** @type {import('tailwindcss').Config} */ export default { darkMode: ['class'], @@ -262,11 +265,5 @@ export default { }, }, }, - plugins: [ - // Using ES module imports - // Note: This assumes these packages support ES module imports - // If issues occur, may need to fallback to require() and disable ESLint rules - import('tailwindcss-animate').then(module => module.default), - import('@tailwindcss/typography').then(module => module.default), - ], + plugins: [tailwindcssAnimate, typography], }