forked from mermaid-js/mermaid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
31 lines (29 loc) · 852 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
import jison from './.vite/jisonPlugin.js';
import typescript from '@rollup/plugin-typescript';
import { defineConfig } from 'vitest/config';
export default defineConfig({
resolve: {
extensions: ['.js'],
},
plugins: [
jison(),
// @ts-expect-error According to the type definitions, rollup plugins are incompatible with vite
typescript({ compilerOptions: { declaration: false } }),
],
test: {
environment: 'jsdom',
globals: true,
// TODO: should we move this to a mermaid-core package?
setupFiles: ['packages/mermaid/src/tests/setup.ts'],
coverage: {
reporter: ['text', 'json', 'html', 'lcov'],
},
},
build: {
/** If you set esmExternals to true, this plugins assumes that
all external dependencies are ES modules */
commonjsOptions: {
esmExternals: true,
},
},
});