/ proof-of-concept / toy-instruments
Sign in
proof-of-concept / toy-instruments
toy-instruments / vite.embed.config.ts
13 lines · 466 BCodeBlameHistory
3// The embeddable widget (src/embed.ts): one ES module that defines <toy-instrument-sim>,
4// with three.js, the styles and the solver worker inlined, so it runs from any origin.
5export default defineConfig({
6 worker: { format: 'es' },
7 build: {
8 outDir: 'embed-dist',
9 emptyOutDir: true,
10 copyPublicDir: false,
11 lib: { entry: 'src/embed.ts', formats: ['es'], fileName: () => 'toy-instruments-embed.js' },
12 },
13});
↑↓ move↵openescclose