Spaces:
Runtime error
Runtime error
Download frontend/vite.config.ts from npisb/pipecountapp-dev: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/spaces/npisb/pipecountapp-dev/resolve/main/frontend/vite.config.ts
- Command line
-
hf download hf://spaces/npisb/pipecountapp-dev/frontend/vite.config.ts
-
curl -L -o vite.config.ts https://huggingface.co/spaces/npisb/pipecountapp-dev/resolve/main/frontend/vite.config.ts
1.69 kB
| import { defineConfig } from 'vite' | |
| import react from '@vitejs/plugin-react' | |
| import tailwindcss from '@tailwindcss/vite' | |
| import { VitePWA } from 'vite-plugin-pwa' | |
| export default defineConfig({ | |
| plugins: [ | |
| react(), | |
| tailwindcss(), | |
| VitePWA({ | |
| registerType: 'autoUpdate', | |
| includeAssets: [ | |
| 'models/countmodel.onnx', | |
| 'models/countmodel-640.onnx', | |
| 'models/countmodel-int8.onnx', | |
| 'images/**/*', | |
| 'icon.png', | |
| ], | |
| manifest: { | |
| name: 'NPI Pipe Count', | |
| short_name: 'Pipe Count', | |
| description: 'Offline pipe counting with diameter sorting', | |
| theme_color: '#004973', | |
| background_color: '#004973', | |
| display: 'standalone', | |
| orientation: 'portrait', | |
| start_url: '/', | |
| icons: [ | |
| { | |
| src: '/images/touch/android-chrome-192x192.png', | |
| sizes: '192x192', | |
| type: 'image/png', | |
| purpose: 'any', | |
| }, | |
| { | |
| src: '/images/touch/android-chrome-512x512.png', | |
| sizes: '512x512', | |
| type: 'image/png', | |
| purpose: 'any maskable', | |
| }, | |
| ], | |
| }, | |
| workbox: { | |
| globPatterns: ['**/*.{js,css,html,ico,png,svg,onnx,wasm}'], | |
| maximumFileSizeToCacheInBytes: 30 * 1024 * 1024, | |
| }, | |
| }), | |
| ], | |
| server: { | |
| headers: { | |
| 'Cross-Origin-Opener-Policy': 'same-origin', | |
| 'Cross-Origin-Embedder-Policy': 'require-corp', | |
| }, | |
| }, | |
| preview: { | |
| headers: { | |
| 'Cross-Origin-Opener-Policy': 'same-origin', | |
| 'Cross-Origin-Embedder-Policy': 'require-corp', | |
| }, | |
| }, | |
| build: { | |
| outDir: 'dist', | |
| sourcemap: false, | |
| }, | |
| }) | |