-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.app.mjs
43 lines (39 loc) · 972 Bytes
/
vite.config.app.mjs
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
import {join} from 'node:path';
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
const PACKAGE_ROOT = __dirname;
const empty = join(PACKAGE_ROOT, 'src/app/util/empty.js');
// https://vitejs.dev/config/
export default defineConfig({
base: '',
plugins: [react()],
mode: 'development',
resolve: {
alias: {
'/@/': join(PACKAGE_ROOT, 'src') + '/',
'path': empty,
'fs': empty,
'@mui/styles': 'mui-styles',
},
},
build: {
outDir: "dist/app",
minify: false,
sourcemap: false,
rollupOptions: {
input: [
'src/app/llvm-coverage-viewer.jsx',
],
output: {
entryFileNames: '[name]-browser.js',
assetFileNames: 'assets/[name][extname]',
},
onLog(level, log, handler) {
if (log.cause && log.cause.message === `Can't resolve original location of error.`) {
return;
}
handler(level, log);
}
}
}
})