diff --git a/userfront/nginx.conf b/userfront/nginx.conf index 8a4fcffa..64a6f1a7 100644 --- a/userfront/nginx.conf +++ b/userfront/nginx.conf @@ -36,6 +36,21 @@ server { } # --- UserFront Static Files --- + # dart2wasm 엔트리포인트는 module 스크립트(.mjs)로 로드되므로 + # MIME이 정확히 내려가지 않으면 브라우저가 로딩을 차단합니다. + location ~* \.mjs$ { + root /usr/share/nginx/html; + default_type application/javascript; + try_files $uri =404; + } + + # dart2wasm 바이너리 MIME 명시 + location ~* \.wasm$ { + root /usr/share/nginx/html; + default_type application/wasm; + try_files $uri =404; + } + location / { root /usr/share/nginx/html; index index.html;