You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This separates webpack's publicPath from react-router's basename. They
have similar effects - and still need to be set in conjunction in dev
mode (but not in a production build, where publicPath is set to 'auto')
- but it is very confusing to give them the same name in configuration.
Relatedly, this also removes support for `history` and its similarly
confusing reliance on basename, which is not even supported on newer
versions of the package, anyway. Consuming apps should be using
`useNavigate()` instead.
- the `basename` and `history` exports have been replaced by function getters: `getBasename` and `getHistory`. This is because it may not be possible to determine the values of the original constants at code initialization time, since our config may arrive asynchronously. This ensures that anyone trying to get these values gets a current value.
79
+
- the `basename` and export has been replaced by: `getBasename`. This is because it may not be possible to determine the values of the original constants at code initialization time, since our config may arrive asynchronously. This ensures that anyone trying to get these values gets a current value.
80
+
- the `history` export no longer exists. Consumers should be using react-router 6's `useNavigate()` API instead.
81
81
- When using MockAuthService, set the authenticated user by calling setAuthenticatedUser after instantiating the service. It's not okay for us to add arbitrary config values to the site config.
82
82
-`REFRESH_ACCESS_TOKEN_ENDPOINT` has been replaced with `refreshAccessTokenApiPath`. It is now a path that defaults to '/login_refresh'. The Auth service assumes it is an endpoint on the LMS, and joins the path with `lmsBaseUrl`. This change creates more parity with other paths such as `csrfTokenApiPath`.
Copy file name to clipboardExpand all lines: docs/how_tos/migrate-frontend-app.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -499,16 +499,16 @@ Optional config
499
499
500
500
Other configuration is now optional, and many values have been given sensible defaults. But these configuration variables are also available (as of this writing):
501
501
502
+
- environment: EnvironmentTypes
503
+
- basename: string
504
+
- mfeConfigApiUrl: string | null
502
505
- accessTokenCookieName: string
503
506
- languagePreferenceCookieName: string
504
507
- userInfoCookieName: string
505
508
- csrfTokenApiPath: string
506
509
- refreshAccessTokenApiPath: string
507
510
- ignoredErrorRegex: RegExp | null
508
511
- segmentKey: string | null
509
-
- environment: EnvironmentTypes
510
-
- mfeConfigApiUrl: string | null
511
-
- publicPath: string
512
512
513
513
URL Config changes
514
514
------------------
@@ -573,7 +573,7 @@ Once you've verified your test suite still works, you should delete the `.env.te
573
573
A sample `site.config.test.tsx` file:
574
574
575
575
```
576
-
import { SiteConfig } from '@openedx/frontend-base';
576
+
import { EnvironmentTypes, SiteConfig } from '@openedx/frontend-base';
0 commit comments