/ proof-of-concept / midiboot
Sign in
proof-of-concept / midiboot
midiboot / vite.config.ts
17 lines · 696 BBlameHistoryRaw
1import { defineConfig } from 'vite';
2import react from '@vitejs/plugin-react';
3import { realpathSync } from 'node:fs';
4import { resolve } from 'node:path';
6// The simulated instruments live in the sibling collection (the vault
7// layout): each repo carries an instrument.json manifest and MATLAB
8// sources that midiboot imports at build time via import.meta.glob, so
9// the dev server must be allowed to read them from their real path.
10const simulated = realpathSync(resolve(import.meta.dirname, '../../simulated_instruments'));
12export default defineConfig({
13 base: './',
14 plugins: [react()],
15 server: { fs: { allow: [import.meta.dirname, simulated] } },
16 build: { target: 'es2022' },
17});
↑↓ move↵openescclose