Reverted all changes back to version 42b6408f00
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
import {notFound} from 'next/navigation';
|
|
||||||
import {getRequestConfig} from 'next-intl/server';
|
import {getRequestConfig} from 'next-intl/server';
|
||||||
|
|
||||||
const locales = ['en'];
|
export const locales = ['en'];
|
||||||
|
export const defaultLocale = 'en';
|
||||||
|
|
||||||
export default getRequestConfig(async ({locale}) => {
|
export default getRequestConfig(async ({locale}) => {
|
||||||
if (!locales.includes(locale as any)) notFound();
|
if (!locales.includes(locale as any)) {
|
||||||
|
locale = defaultLocale;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
messages: (await import(`../messages/${locale}.json`)).default
|
messages: (await import(`../messages/${locale}.json`)).default
|
||||||
|
|||||||
@@ -6,6 +6,5 @@ export default createMiddleware({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
// Match only internationalized pathnames
|
matcher: ['/((?!api|_next|_vercel|.*\\..*).*)']
|
||||||
matcher: ['/', '/(en)/:path*']
|
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user