web: vite + react + tailwind hello page with dark-mode toggle
Workspace packages export TS source under a 'source' condition used by vite, node (--conditions=source) and tsc. Task: M0-T4
This commit is contained in:
1 parent
08bd33eefa
commit
d12795ec8b
11 files changed
+581
-47
No files matched your search
@@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
import { defaultClientConditions, defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
resolve: { conditions: ['source', ...defaultClientConditions] }, // workspace packages ship TS source
|
||||
server: {
|
||||
proxy: {
|
||||
// Same split as the reverse proxy (01 §5): /ws is Asterisk SIP-over-WebSocket, the rest is the api.
|
||||
'/api': { target: 'http://127.0.0.1:8080', ws: true },
|
||||
'/ws': { target: 'ws://127.0.0.1:8088', ws: true },
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user