-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
32 lines (30 loc) · 862 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
import { defineConfig } from 'vite'
import { getDirname } from '@adonisjs/core/helpers'
import inertia from '@adonisjs/inertia/client'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import adonisjs from '@adonisjs/vite/client'
import path from 'node:path'
export default defineConfig({
build: {
rollupOptions: {
external: ['JSZip'],
},
},
plugins: [
inertia(),
svelte(),
adonisjs({ entrypoints: ['inertia/app/app.ts'], reload: ['resources/views/**/*.edge'] }),
],
/**
* Define aliases for importing modules from
* your frontend code
*/
resolve: {
alias: {
'~/': `${getDirname(import.meta.url)}/inertia/`,
'$lib': `${getDirname(import.meta.url)}/inertia/lib`,
'$components': path.resolve('./inertia/components'),
'$helpers': path.resolve('./inertia/lib/helpers'),
},
},
})