halfPage/vite.config.ts
wont-stream 2f60206e25 feat: initialize new tab page with Preact and Vite setup
- Added index.html as the main entry point for the application.
- Created package.json with dependencies for Preact, Halfmoon, and TypeScript.
- Included favicon.svg for the application icon.
- Added robots.txt for search engine directives.
- Created app.css for styling the application.
- Implemented app.tsx as the main application component with Navbar and Container.
- Developed container component to display a greeting and search form.
- Added weather description JSON data for dynamic weather updates.
- Built navbar component to fetch and display current weather information.
- Set up index.css for global styles.
- Configured main.tsx to render the application.
- Added TypeScript environment definitions.
- Established TypeScript configuration files for app and node.
- Configured Vite with Preact preset and PostCSS for production optimizations.
2025-04-09 21:56:32 -04:00

26 lines
603 B
TypeScript

/// <reference types="vite/client" />
import { defineConfig } from 'vite'
import preact from '@preact/preset-vite'
import postCSSPurgeCSS from "@fullhuman/postcss-purgecss";
// https://vite.dev/config/
export default defineConfig({
css: {
...(import.meta.env.NODE_ENV === "production") ? {
transformer: "postcss",
postcss: {
plugins: [
postCSSPurgeCSS({
content: ["./index.html", "./src/**/*.{ts,tsx}"],
})
]
}
} : {transformer: "lightningcss"}
},
build: {
cssMinify: "lightningcss",
},
plugins: [preact()],
})