-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
62 lines (60 loc) · 1.61 KB
/
Copy pathvite.config.ts
File metadata and controls
62 lines (60 loc) · 1.61 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve, dirname } from 'path'
import { fileURLToPath } from 'url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
export default defineConfig({
plugins: [vue()],
build: {
lib: {
entry: resolve(__dirname, 'resources/js/app.ts'),
name: 'LaraviltAuth',
formats: ['es', 'umd'],
fileName: (format) => `auth.${format}.js`,
},
rollupOptions: {
external: [
'vue',
'@inertiajs/vue3',
'radix-vue',
'reka-ui',
'lucide-vue-next',
'tailwind-merge',
'clsx',
'class-variance-authority',
'@vueuse/core',
/@laravilt\/.*/,
// External app-level imports (provided by consuming app)
/^@\/components\/.*/,
/^@\/routes.*/,
/^@\/composables\/.*/,
/^@\/lib\/.*/,
],
output: {
globals: {
vue: 'Vue',
'@inertiajs/vue3': 'InertiaVue3',
'radix-vue': 'RadixVue',
'reka-ui': 'RekaUI',
'lucide-vue-next': 'LucideVueNext',
'tailwind-merge': 'TailwindMerge',
clsx: 'clsx',
'class-variance-authority': 'ClassVarianceAuthority',
'@vueuse/core': 'VueUseCore',
},
assetFileNames: (assetInfo) => {
if (assetInfo.name === 'style.css') return 'style.css'
return assetInfo.name as string
},
},
},
outDir: 'dist',
emptyOutDir: true,
},
resolve: {
alias: {
'@': resolve(__dirname, 'resources/js'),
},
},
})