Files
FarmaFinder/apps/frontend/vite.config.js
Ichitux 302d574220
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 2m6s
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
Manifest changes to PWA
2026-07-08 23:54:50 +02:00

57 lines
1.4 KiB
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.js',
injectRegister: 'auto',
devOptions: {
enabled: true,
type: 'module',
navigateFallback: 'index.html',
},
manifest: {
name: 'FarmaClic',
short_name: 'FarmaClic',
description: 'Encuentra medicamentos en farmacias cercanas',
theme_color: '#c0dde9',
background_color: '#f8fafb',
display: 'standalone',
start_url: '/',
lang: 'es',
scope: '/',
id: 'farmaclic_app',
dir: 'auto',
orientation: 'natural',
categories: ['health', 'utilities'],
icons: [
{ src: '/farmaclic_logo.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' },
],
},
}),
],
test: {
environment: 'jsdom',
setupFiles: ['./src/test/setup.js'],
globals: true,
},
server: {
allowedHosts: ['localhost', 'farmacias.hacecalor.net'],
port: 3000,
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
credentials: true,
},
},
},
});