-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
38 lines (37 loc) · 949 Bytes
/
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
/// <reference types="vitest" />
import { resolve } from 'node:path';
import { alpineTestingPlugin } from 'testing-library-alpine';
import { defineConfig } from 'vite';
const accessOwnSources = () => {
return {
name: 'access-own-package-sources',
enforce: 'pre' as const,
resolveId(id: string) {
if (id.startsWith('@ekwoka') && !id.endsWith('src')) {
return {
id: resolve(`./packages/${id.replace('@ekwoka/', '')}/src`),
external: false,
};
}
},
};
};
console.log('defining config');
export default defineConfig({
root: resolve(__dirname),
plugins: [accessOwnSources(), alpineTestingPlugin()],
build: {
target: 'esnext',
},
resolve: {
mainFields: ['module', 'main'],
},
test: {
globals: true,
include: ['./**/*{.spec,.test}.{ts,tsx}'],
includeSource: ['./**/*.{ts,tsx}'],
reporters: ['dot'],
deps: {},
passWithNoTests: true,
},
});