Compare commits

..

1 Commits

Author SHA1 Message Date
lebaudantoine 365f2efb2e 🔖(patch)) release 1.25.1 2026-08-06 11:30:08 +02:00
7 changed files with 2 additions and 40 deletions
-5
View File
@@ -8,11 +8,6 @@ and this project adheres to
## [Unreleased] ## [Unreleased]
### Fixed
- 🐛(frontend) serve MediaPipe assets under a versioned path
- 🐛(frontend) harmonize cache configuration for MediaPipe assets
## [1.25.1] - 2026-08-06 ## [1.25.1] - 2026-08-06
### Fixed ### Fixed
-5
View File
@@ -65,11 +65,6 @@ server {
sub_filter_once off; sub_filter_once off;
} }
location ^~ /assets/mediapipe/wasm/ {
expires 30d;
add_header Cache-Control "public, max-age=2592000";
}
# Serve static files with caching # Serve static files with caching
location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 30d; expires 30d;
-5
View File
@@ -4,11 +4,6 @@ server {
server_tokens off; server_tokens off;
root /usr/share/nginx/html; root /usr/share/nginx/html;
location ^~ /assets/mediapipe/wasm/ {
expires 30d;
add_header Cache-Control "public, max-age=2592000";
}
# Serve static files with caching # Serve static files with caching
location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
@@ -10,7 +10,7 @@ export const SELFIE_SEGMENTER_MODEL_PATH =
export const FACE_LANDMARKS_MODEL_PATH = export const FACE_LANDMARKS_MODEL_PATH =
'/assets/mediapipe/models/face_landmarker.task' '/assets/mediapipe/models/face_landmarker.task'
export const MEDIAPIPE_PATH_WASM = `/assets/mediapipe/wasm/${__MEDIAPIPE_VERSION__}` export const MEDIAPIPE_PATH_WASM = '/assets/mediapipe/wasm'
export enum ProcessorType { export enum ProcessorType {
BLUR = 'blur', BLUR = 'blur',
-4
View File
@@ -1,8 +1,4 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
// Version of @mediapipe/tasks-vision, injected at build time (vite.config.ts).
declare const __MEDIAPIPE_VERSION__: string
interface ImportMetaEnv { interface ImportMetaEnv {
readonly VITE_API_BASE_URL: string readonly VITE_API_BASE_URL: string
readonly VITE_APP_TITLE: string readonly VITE_APP_TITLE: string
+1 -15
View File
@@ -1,27 +1,13 @@
import { readFileSync } from 'node:fs'
import { defineConfig, loadEnv } from 'vite' import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
import { visualizer } from 'rollup-plugin-visualizer' import { visualizer } from 'rollup-plugin-visualizer'
import svgr from 'vite-plugin-svgr' import svgr from 'vite-plugin-svgr'
import { viteStaticCopy } from 'vite-plugin-static-copy' import { viteStaticCopy } from 'vite-plugin-static-copy'
const mediapipeVersion: string = JSON.parse(
readFileSync(
new URL(
'./node_modules/@mediapipe/tasks-vision/package.json',
import.meta.url
),
'utf-8'
)
).version
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig(({ mode }) => { export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd()) const env = loadEnv(mode, process.cwd())
return { return {
define: {
__MEDIAPIPE_VERSION__: JSON.stringify(mediapipeVersion),
},
plugins: [ plugins: [
react(), react(),
svgr({ svgr({
@@ -37,7 +23,7 @@ export default defineConfig(({ mode }) => {
targets: [ targets: [
{ {
src: 'node_modules/@mediapipe/tasks-vision/wasm/*', src: 'node_modules/@mediapipe/tasks-vision/wasm/*',
dest: `assets/mediapipe/wasm/${mediapipeVersion}`, dest: 'assets/mediapipe/wasm',
rename: { stripBase: 4 }, rename: { stripBase: 4 },
}, },
{ {
@@ -73,11 +73,6 @@ data:
sub_filter_once off; sub_filter_once off;
} }
location ^~ /assets/mediapipe/wasm/ {
expires 30d;
add_header Cache-Control "public, max-age=2592000";
}
# Serve static files with caching # Serve static files with caching
location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 30d; expires 30d;