mermaid/vite.config.ts

27 lines
652 B
TypeScript
Raw Normal View History

2022-09-22 12:05:22 +02:00
import jison from './.vite/jisonPlugin';
import { defineConfig } from 'vitest/config';
export default defineConfig({
resolve: {
extensions: ['.jison', '.js', '.ts', '.json'],
},
plugins: [jison()],
test: {
environment: 'jsdom',
globals: true,
2022-09-25 20:18:16 +02:00
// TODO: should we move this to a mermaid-core package?
setupFiles: ['packages/mermaid/src/tests/setup.ts'],
2022-09-22 12:15:44 +02:00
coverage: {
reporter: ['text', 'json', 'html', 'lcov'],
},
2022-09-22 12:05:22 +02:00
},
2022-10-05 13:14:05 +02:00
build: {
/** If you set esmExternals to true, this plugins assumes that
all external dependencies are ES modules */
commonjsOptions: {
esmExternals: true,
},
},
2022-09-22 12:05:22 +02:00
});