-
Notifications
You must be signed in to change notification settings - Fork 60
/
vite.config.ts
45 lines (42 loc) · 1.01 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths'
import react from '@vitejs/plugin-react'
import {resolve, join} from "path";
const packagesAliases = [
{
find: /^styles/,
replacement: resolve(__dirname, 'packages/styles')
},
{
find: /^common-css/,
replacement: resolve(__dirname, 'packages/common-css')
},
{
find: /^theming-base-content/,
replacement: resolve(__dirname, 'node_modules/@sap-theming/theming-base-content')
}
];
export default defineConfig({
plugins: [tsconfigPaths({
root: __dirname,
}), react()],
resolve: {
alias: [
...packagesAliases
]
},
css: {},
build: {
target: 'es2015',
minify: 'terser',
reportCompressedSize: true,
sourcemap: false
},
assetsInclude: [
'**/*.md'
],
test: {
environment: 'jsdom',
setupFiles: [resolve(join(__dirname, 'vitest.setup.ts'))]
},
});