From 57e8fc8659cef47f50791186049a5628b922c83d Mon Sep 17 00:00:00 2001 From: "Your Name (aider)" Date: Mon, 28 Apr 2025 01:20:12 +0800 Subject: [PATCH] build: Configure Vite to serve on localhost:5173 --- package.json | 6 ++++-- vite.config.js | 15 +++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 71f7ef0..ccb0c83 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,15 @@ "description": "A simple web application for sharing desk moments and finds.", "main": "index.js", "scripts": { - "dev": "postcss src/styles.css -o dist/output.css && tailwindcss -i src/styles.css -o dist/output.css --watch" + "dev": "vite", + "build": "vite build" }, "author": "", "license": "ISC", "devDependencies": { "autoprefixer": "^10.4.13", "postcss": "^8.4.19", - "tailwindcss": "^3.2.4" + "tailwindcss": "^3.2.4", + "vite": "^4.0.0" } } diff --git a/vite.config.js b/vite.config.js index 5f4482e..4cb7579 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,13 +1,8 @@ -import { resolve } from 'path' -import { defineConfig } from 'vite' +import { defineConfig } from 'vite'; export default defineConfig({ - build: { - rollupOptions: { - input: { - main: resolve(__dirname, 'index.html'), - login: resolve(__dirname, 'login.html'), - }, - }, + server: { + port: 5173, + host: 'localhost', }, -}) +});