-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathvite.config.mjs
More file actions
73 lines (67 loc) · 1.96 KB
/
Copy pathvite.config.mjs
File metadata and controls
73 lines (67 loc) · 1.96 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
// vite.config.js
import {defineConfig} from 'vite';
import path from 'path';
import laravel from 'laravel-vite-plugin';
import {viteStaticCopy} from 'vite-plugin-static-copy';
import fs from 'fs';
const version = fs.readFileSync('version.txt', 'utf-8').trim();
export default defineConfig({
define: {
'process.env.APP_VERSION': JSON.stringify(version),
},
server: {
host: 'localhost',
port: 5173,
},
plugins: [
laravel({
input: [
// Core
'resources/js/app.js',
'resources/css/app.css',
// Charts
'resources/charts/chart-home.js',
'resources/charts/chart-maturity.js',
'resources/charts/chart-relation.js',
'resources/charts/chart-patching.js',
// Mapping
'resources/css/mapping.css',
// D3 / Viz
'resources/js/graphviz.js',
'resources/js/vis-network.js',
// Maps
'resources/graphs/map.show.ts',
'resources/graphs/map.edit.ts',
// BPMN (ex-package autonome)
'resources/BPMN/bpmn.ts',
'resources/BPMN/bpmn-show.ts',
// Parser
'resources/js/sql-parser.js',
],
refresh: true,
}),
viteStaticCopy({
targets: [
{
src: 'resources/fonts/bpmn.ttf',
dest: 'fonts',
},
],
}),
],
resolve: {
dedupe: ['chart.js'],
alias: {
'@': '/resources/js',
'@sourcentis/chartjs-gauge': path.resolve(
__dirname,
'vendor/sourcentis/chartjs-gauge/js/index.js'
),
},
},
build: {
sourcemap: true,
target: 'esnext',
chunkSizeWarningLimit: 5000,
},
});