import { defineConfig } from 'vite'; // The embeddable widget (src/embed.ts): one ES module that defines , // with three.js, the styles and the solver worker inlined, so it runs from any origin. export default defineConfig({ worker: { format: 'es' }, build: { outDir: 'embed-dist', emptyOutDir: true, copyPublicDir: false, lib: { entry: 'src/embed.ts', formats: ['es'], fileName: () => 'toy-instruments-embed.js' }, }, });