-
Notifications
You must be signed in to change notification settings - Fork 18
/
vite.config.ts
34 lines (33 loc) · 869 Bytes
/
vite.config.ts
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
import { fileURLToPath, URL } from 'node:url';
import { rmSync } from 'node:fs';
import { resolve } from 'node:path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vuetify from 'vite-plugin-vuetify';
import functions from 'vite-plugin-cloudflare-functions';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
vuetify(),
{
name: 'vite-plugin-fix-wrangler',
configureServer: () => {
rmSync(resolve(import.meta.dirname, 'api/node_modules'), { recursive: true });
},
},
functions({
root: './api/functions',
dts: false,
wrangler: {
// log: true,
},
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
types: fileURLToPath(new URL('./types', import.meta.url)),
},
},
});