-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvite.config.js
More file actions
87 lines (86 loc) · 2.67 KB
/
Copy pathvite.config.js
File metadata and controls
87 lines (86 loc) · 2.67 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import path from 'path';
export default defineConfig({
plugins: [
laravel({
input: ['resources/js/app.js'],
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
resolve: {
alias: [
// Use the full build of Vue that includes the template compiler
{ find: 'vue', replacement: 'vue/dist/vue.esm-bundler.js' },
// Define aliases for easier imports
{ find: '@', replacement: path.resolve(__dirname, 'resources/js') },
// Prevent bundling optional amCharts PDF/XLSX export dependencies (unused - no export menu in this app)
{
find: /^pdfmake\/build\/pdfmake\.js$/,
replacement: path.resolve(
__dirname,
'resources/js/shims/noop-module.js',
),
},
{
find: /^(\.\.\/)+pdfmake\/vfs_fonts(\.js)?$/,
replacement: path.resolve(
__dirname,
'resources/js/shims/noop-module.js',
),
},
{
find: /^(\.\.\/)+bundled\/xlsx$/,
replacement: path.resolve(
__dirname,
'resources/js/shims/noop-module.js',
),
},
{
find: /^(\.\.\/)+canvg\/index\.js$/,
replacement: path.resolve(
__dirname,
'resources/js/shims/noop-module.js',
),
},
],
},
optimizeDeps: {
exclude: ['pdfmake', 'pdfmake/build/pdfmake.js'],
},
define: {
// Define Vue feature flags for better tree-shaking
__VUE_OPTIONS_API__: true,
__VUE_PROD_DEVTOOLS__: false,
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
},
css: {
preprocessorOptions: {
scss: {
// Suppress deprecation warnings from node_modules only.
// Our own @import warnings remain visible as a reminder to migrate to @use.
quietDeps: true,
},
},
},
server: {
watch: {
ignored: ['**/storage/framework/views/**'],
},
host: '0.0.0.0',
port: Number(process.env.VITE_PORT) || 5173,
strictPort: true,
hmr: {
host: 'localhost',
},
},
});