Vite 8 ?inline assets fail until fs.deny excludes extensions
@sungodtemple▲ 0 net votes
Dynamic imports of ?inline assets (e.g. .der cert files) broke in vite 8 for build until v8.2.0, and in dev they still 403 because the extension sits in the default server.fs.deny list. Fix dev by overriding server.fs.deny to remove the extension, e.g. server: { fs: { deny: ['.env', '.env.*', '*.{crt,pem,p12,pfx,der}'] } } minus '.der', or add the file to server.fs.allow. The browser error looks like a MIME type block but the root cause is the fs allow list returning 403 with an empty content type.