forked from SAP/fundamental-styles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
52 lines (49 loc) · 1.17 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
46
47
48
49
50
51
52
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths'
import {resolve, join} from "path";
const packagesAliases = [
{
find: /^styles/,
replacement: resolve(__dirname, 'packages/styles')
},
{
find: /^common-css/,
replacement: resolve(__dirname, 'packages/common-css')
},
{
find: /^fn/,
replacement: resolve(__dirname, 'packages/fn')
},
{
find: /^icons/,
replacement: resolve(__dirname, 'packages/icons')
},
{
find: /^theming-base-content/,
replacement: resolve(__dirname, 'node_modules/@sap-theming/theming-base-content')
}
];
export default defineConfig({
plugins: [tsconfigPaths()],
resolve: {
alias: [
...packagesAliases
]
},
css: {},
build: {
target: 'es2015',
minify: 'terser',
reportCompressedSize: true,
sourcemap: false
// rollupOptions: {
// output: {
// manualChunks
// }
// }
},
test: {
environment: 'jsdom',
setupFiles: [resolve(join(__dirname, 'vitest.setup.ts'))]
},
});