aboutsummaryrefslogtreecommitdiff
path: root/modern/vite.config.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-08-19 13:58:45 -0700
committerAnton Tananaev <anton@traccar.org>2023-08-19 13:59:07 -0700
commitd3c7705bedebd65c94f9eea691aaf2fe03b0cafe (patch)
tree5f98b3d9bbbd4fe8067b5a334e84aff008b8db22 /modern/vite.config.js
parent0161ae449d4a7bd0781c0665d663353663ab0faf (diff)
downloadtrackermap-web-d3c7705bedebd65c94f9eea691aaf2fe03b0cafe.tar.gz
trackermap-web-d3c7705bedebd65c94f9eea691aaf2fe03b0cafe.tar.bz2
trackermap-web-d3c7705bedebd65c94f9eea691aaf2fe03b0cafe.zip
Move to Vite
Diffstat (limited to 'modern/vite.config.js')
-rw-r--r--modern/vite.config.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/modern/vite.config.js b/modern/vite.config.js
new file mode 100644
index 00000000..fbe828a5
--- /dev/null
+++ b/modern/vite.config.js
@@ -0,0 +1,20 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+import svgr from 'vite-plugin-svgr';
+import { VitePWA } from 'vite-plugin-pwa'
+
+export default defineConfig(() => {
+ return {
+ server: {
+ port: 3000,
+ proxy: {
+ '/api/socket': 'ws://localhost:8082',
+ '/api': 'http://localhost:8082',
+ },
+ },
+ build: {
+ outDir: 'build',
+ },
+ plugins: [svgr(), react(), VitePWA()],
+ };
+});