@AlbertDugba
i found solution by trying this on the vite react app, where i am using the tailwind css and then make a build with minifed version of the JS file with the tailwind css classes, see my vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
export default defineConfig({
plugins: [
react(),
cssInjectedByJsPlugin({
relativeCSSInjection: true,
}),
],
build: {
rollupOptions: { output: { manualChunks: undefined } },
minify: true,
},
server: {
host: "localhost",
port: 3000,
},
});