-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
45 lines (44 loc) · 1.24 KB
/
Copy pathvite.config.ts
File metadata and controls
45 lines (44 loc) · 1.24 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
41
42
43
44
45
import { resolve } from "node:path";
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
root: "frontend",
plugins: [
tailwindcss(),
{
name: "servicios-slug-rewrite",
configureServer(server) {
server.middlewares.use((req, _res, next) => {
if (req.url && /^\/servicios\/[^/?#]+/.test(req.url)) {
req.url = "/servicios.html";
}
next();
});
},
},
],
build: {
outDir: "../dist/client",
emptyOutDir: true,
rollupOptions: {
input: {
index: resolve(__dirname, "frontend/index.html"),
proyectos: resolve(__dirname, "frontend/proyectos.html"),
blog: resolve(__dirname, "frontend/blog.html"),
contacto: resolve(__dirname, "frontend/contacto.html"),
servicios: resolve(__dirname, "frontend/servicios.html"),
formacion: resolve(__dirname, "frontend/formacion.html"),
},
},
},
server: {
host: true,
allowedHosts: ["cardinal.meteorobalboa.com"],
proxy: {
"/api": "http://localhost:3000",
"/admin": "http://localhost:3000",
"/uploads": "http://localhost:3000",
"/banco/": "http://localhost:3000",
},
},
});