mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 12:54:08 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			652 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			652 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
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,
 | 
						|
    // 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,
 | 
						|
    },
 | 
						|
  },
 | 
						|
});
 |