-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
40 lines (39 loc) · 1.11 KB
/
vite.config.ts
File metadata and controls
40 lines (39 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
// https://vite.dev/config/
export default defineConfig({
base: "/",
preview: {
port: 4173,
host: true, // bind to all network interfaces
strictPort: true,
allowedHosts: ["ranger.hackclub.app", "localhost"],
},
plugins: [react(), tailwindcss()],
assetsInclude: ["**/*.md", "**/*.webp", "**/*.png", "**/*.svg"],
build: {
assetsDir: "",
copyPublicDir: true,
rollupOptions: {
output: {
manualChunks: {
vendor: ["react", "react-dom", "react-router-dom"],
layout: [
"./src/components/layout.tsx",
"./src/components/header.tsx",
"./src/components/navLinks.tsx",
"./src/components/mobileMenu.tsx",
],
home: ["./src/pages/home.tsx"],
about: ["./src/pages/about.tsx"],
projects: [
"./src/pages/projectsList.tsx",
"./src/pages/project.tsx",
"./src/components/projectItem.tsx",
],
},
},
},
},
});