-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
33 lines (28 loc) · 782 Bytes
/
vite.config.ts
File metadata and controls
33 lines (28 loc) · 782 Bytes
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
/// <reference types='vitest' />
import { defineConfig } from 'vite';
import path from 'path';
import vitePluginPPM from 'vite-plugin-ppm';
const __dirname = path.dirname(new URL(import.meta.url).pathname);
export default defineConfig({
root: __dirname,
cacheDir: 'node_modules/.vite',
// Configuration for building your library.
// See: https://vitejs.dev/guide/build.html#library-mode
build: {
outDir: 'dist',
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
},
plugins: [vitePluginPPM()],
test: {
globals: true,
cache: {
dir: 'node_modules/.vitest',
},
environment: 'node',
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
reporters: ['default'],
},
});