mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
Fix: Code splitting for auth routes
This commit is contained in:
parent
54960e085c
commit
7bbfd55eaa
@ -214,8 +214,8 @@ export function App() {
|
||||
<SkipToContent>{formatMessage({ id: 'skipToContent' })}</SkipToContent>
|
||||
<TrackingProvider value={trackingContext}>
|
||||
<Switch>
|
||||
{authRoutes.map(({ path, Component }) => (
|
||||
<Route key={path} path={path} component={Component} exact />
|
||||
{authRoutes.map(({ path, component }) => (
|
||||
<Route key={path} path={path} component={component} exact />
|
||||
))}
|
||||
|
||||
<Route
|
||||
|
||||
@ -2,11 +2,9 @@ import * as React from 'react';
|
||||
|
||||
export const AUTH_ROUTES_EE = [
|
||||
{
|
||||
Component() {
|
||||
return React.lazy(() =>
|
||||
import('../AuthResponse').then((module) => ({ default: module.AuthResponse }))
|
||||
);
|
||||
},
|
||||
component: React.lazy(() =>
|
||||
import('../AuthResponse').then((module) => ({ default: module.AuthResponse }))
|
||||
),
|
||||
path: '/auth/login/:authResponse',
|
||||
},
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user