mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 00:09:51 +02:00
Vite
This commit is contained in:
26
vite.config.js
Normal file
26
vite.config.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig } from 'vite';
|
||||
import jison from './jison';
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js', '.json', '.jison'],
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/mermaid.ts'),
|
||||
name: 'mermaid',
|
||||
// the proper extensions will be added
|
||||
fileName: 'mermaid',
|
||||
},
|
||||
rollupOptions: {
|
||||
plugins: [jison()],
|
||||
// make sure to externalize deps that shouldn't be bundled
|
||||
// into your library
|
||||
output: {
|
||||
name: 'mermaid',
|
||||
// Provide global variables to use in the UMD build
|
||||
// for externalized deps
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user