/ proof-of-concept / midiboot
Sign in
proof-of-concept / midiboot
midiboot / vite.config.ts
18 lines · 749 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/ module implementing the
8// track-render interface plus the MATLAB sources it globs at build time,
9// imported directly by src/instruments/sim.ts, so the dev server must be
10// allowed to read them from their real path.
11const simulated = realpathSync(resolve(import.meta.dirname, '../../simulated_instruments'));
13export default defineConfig({
14 base: './',
15 plugins: [react()],
16 server: { fs: { allow: [import.meta.dirname, simulated] } },
17 build: { target: 'es2022' },
18});
↑↓ move↵openescclose