Files
rubix-explore/vite.config.js

52 lines
1.4 KiB
JavaScript
Raw Permalink Normal View History

2024-10-18 17:08:43 +05:30
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import { VitePWA } from 'vite-plugin-pwa';
2024-09-24 12:10:18 +05:30
export default defineConfig({
2024-10-15 19:06:53 +05:30
server: {
host: "0.0.0.0",
port: 3000, // You can use any port
2024-10-18 17:08:43 +05:30
proxy: {
// This proxies API calls to your backend during development to bypass CORS
'/api': {
target: 'https://rexplorerapi.azurewebsites.net/', // Replace this with your API base URL
changeOrigin: true, // Needed for virtual hosted sites
secure: false, // If your API is HTTPS and you're not using a certificate, this can be false
rewrite: (path) => path.replace(/^\/api/, ''), // Removes '/api' prefix when forwarding to the server
},
},
2024-10-15 19:06:53 +05:30
},
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
devOptions: {
enabled: true,
},
manifest: {
2024-10-15 19:44:43 +05:30
"theme_color": "#150a29",
"background_color": "#150a29",
2024-10-15 19:28:32 +05:30
"icons": [
2024-10-15 19:06:53 +05:30
{
2024-10-15 19:28:32 +05:30
"purpose": "maskable",
"sizes": "512x512",
"src": "icon512_maskable.png",
"type": "image/png"
2024-10-15 19:06:53 +05:30
},
{
2024-10-15 19:28:32 +05:30
"purpose": "any",
"sizes": "512x512",
"src": "icon512_rounded.png",
"type": "image/png"
}
2024-10-15 19:06:53 +05:30
],
2024-10-15 19:28:32 +05:30
"orientation": "any",
"display": "standalone",
"dir": "auto",
"lang": "en-US",
"name": "Rubix"
2024-10-15 19:06:53 +05:30
},
}),
],
2024-10-18 17:08:43 +05:30
});