-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
vite.config.ts
39 lines (36 loc) · 1.01 KB
/
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
35
36
37
38
39
import unocss from 'unocss/vite'
import { defineConfig } from 'vite'
import { resolve } from 'node:path'
import vue from '@vitejs/plugin-vue'
import postcssNested from 'postcss-nested'
import adonisjs from '@adonisjs/vite/client'
import { getDirname } from '@poppinss/utils'
import inertia from '@adonisjs/inertia/client'
export default defineConfig({
plugins: [
unocss({
configFile: 'inertia/app/uno.config.ts',
}),
inertia({
ssr: {
enabled: true,
entrypoint: 'inertia/app/ssr.ts',
},
}),
vue({
script: { defineModel: true },
template: { compilerOptions: { isCustomElement: (tag) => ['model-viewer'].includes(tag) } },
}),
adonisjs({
entrypoints: ['inertia/app/app.ts'],
reload: ['resources/views/**/*.edge'],
}),
],
resolve: {
alias: {
'@/': `${resolve(getDirname(import.meta.url), 'inertia')}/`,
'~/': `${resolve(getDirname(import.meta.url), '.')}/`,
},
},
css: { postcss: { plugins: [postcssNested] } },
})