i am following this repo to create redirects, just the difference is that i have used javascript - https://github.com/vercel/examples/blob/main/edge-middleware/redirects-bloom-filter/middleware.ts
i have attached my middleware file code in screenshot, when i deploy to vercel it gives below error
Creating an optimized production build ...
Failed to compile.
./middleware.js
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
Learn More: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation
The error was caused by importing 'bloom-filters/dist/api.js' in './middleware.js'.
Import trace for requested module:
./middleware.js
Build failed because of webpack errors
Error: Command "npm run build" exited with 1
Enjoy our curated collection of examples and solutions. Use these patterns to build your own robust and scalable applications. - vercel/examples