Files
6c7c4174-27a5-40db-acca-b6d…/src/middleware.ts
2026-06-09 18:18:24 +00:00

19 lines
385 B
TypeScript

// @ts-expect-error
import createMiddleware from 'next-intl/middleware';
import { locales } from './i18n';
export default createMiddleware({
locales,
defaultLocale: 'en',
localePrefix: 'as-needed',
});
export const config = {
matcher: [
'/',
'/(es|en)/:path*',
// Enable a redirect to a matching locale at the root
// '/((?!_next|_vercel|.*\..*).*)',
],
};