Search works on the built site. Run npm run build and then npm run preview.
npm run build
npm run preview