chore: update PostCSS with Tailwind CSS intergation and adjust dependencies
This commit is contained in:
+10
-8
@@ -1,13 +1,17 @@
|
||||
import devServer from "@hono/vite-dev-server";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
import { devServerConfig } from "./src/adapter/vite/dev-server-config";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import tailwindcss from '@tailwindcss/postcss'
|
||||
import pkg from "./package.json" with { type: "json" };
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
},
|
||||
define: {
|
||||
__isDev: process.env.NODE_ENV === "production" ? "0" : "1",
|
||||
__version: JSON.stringify(pkg.version),
|
||||
@@ -21,23 +25,21 @@ export default defineConfig({
|
||||
overlay: true,
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
tsconfigPaths: true
|
||||
},
|
||||
plugins: [
|
||||
react(),
|
||||
tsconfigPaths({
|
||||
// otherwise it'll throw an error because of examples/astro
|
||||
ignoreConfigErrors: true,
|
||||
}),
|
||||
devServer({
|
||||
...devServerConfig,
|
||||
entry: "./vite.dev.ts",
|
||||
//entry: "./vite.dev.code.ts",
|
||||
}),
|
||||
tailwindcss(),
|
||||
],
|
||||
build: {
|
||||
manifest: true,
|
||||
outDir: "./dist/static",
|
||||
rollupOptions: {
|
||||
rolldownOptions: {
|
||||
input: "./src/ui/main.tsx",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user