simon | 26e79f7 | 2022-10-05 22:16:08 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2022 Savoir-faire Linux Inc. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU Affero General Public License as |
| 6 | * published by the Free Software Foundation; either version 3 of the |
| 7 | * License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU Affero General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Affero General Public |
| 15 | * License along with this program. If not, see |
| 16 | * <https://www.gnu.org/licenses/>. |
| 17 | */ |
simon | d8ca2f2 | 2022-10-11 23:30:55 -0400 | [diff] [blame] | 18 | import react from '@vitejs/plugin-react'; |
| 19 | import { defineConfig } from 'vite'; |
| 20 | import svgrPlugin from 'vite-plugin-svgr'; |
simon | 7a7b4d5 | 2022-09-23 02:09:42 -0400 | [diff] [blame] | 21 | |
simon | d8ca2f2 | 2022-10-11 23:30:55 -0400 | [diff] [blame] | 22 | export default defineConfig({ |
| 23 | server: { |
| 24 | host: '0.0.0.0', |
| 25 | port: 3000, |
| 26 | proxy: { |
Michelle Sepkap Sime | b3dd312 | 2022-11-03 02:12:39 -0400 | [diff] [blame^] | 27 | '^/(api)|^/(auth)|^/(setup)': { |
simon | d8ca2f2 | 2022-10-11 23:30:55 -0400 | [diff] [blame] | 28 | target: 'http://localhost:3001', |
| 29 | secure: false, |
| 30 | }, |
| 31 | }, |
| 32 | }, |
| 33 | preview: { |
| 34 | port: 8080, |
| 35 | }, |
| 36 | define: { |
| 37 | global: {}, |
| 38 | }, |
| 39 | plugins: [react(), svgrPlugin()], |
| 40 | }); |