Switch to version 6: remove src/middleware.ts
This commit is contained in:
@@ -1,18 +0,0 @@
|
|||||||
// @ts-expect-error next-intl middleware type incompatibility
|
|
||||||
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|.*\..*).*)',
|
|
||||||
],
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user