feat: migrate PDF417 barcode decoder from @zxing/browser to zxing-wasm

Replace @zxing/browser with zxing-wasm for better performance and smaller WebAssembly bundle size (919KB). Added middleware exclusion for .wasm files to prevent i18n routing interference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-12-19 18:01:44 +01:00
parent 7467f9d595
commit 5b0497891a
7 changed files with 481 additions and 5 deletions

View File

@@ -44,7 +44,8 @@ export default async function middleware(req: NextRequest) {
export const config = {
// for these paths middleware will not be called
// `pdf.worker.min.mjs` is a web worker code used by pdf.js
// `*.wasm` files are WebAssembly modules used by zxing-wasm
matcher: [
'/((?!api|_next/static|_next/image|.*\\.png$|pdf.worker.min.mjs$|.*\\.webm$).*)',
'/((?!api|_next/static|_next/image|.*\\.png$|pdf.worker.min.mjs$|.*\\.wasm$|.*\\.webm$).*)',
],
};