Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): correctly order CSS imports #5987

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
.announcementBarClose {
flex: 0 0 30px;
align-self: stretch;
padding: 0 !important;
line-height: 0 !important;
padding: 0;
line-height: 0;
}

.announcementBarContent {
Expand Down
7 changes: 4 additions & 3 deletions packages/docusaurus/src/client/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// Load this at the very top!
// client modules have to be loaded before anything else...
import './client-lifecycles-dispatcher';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually have no idea we import client-lifecycles-dispatcher instead of @generated/clientModules here. But side-effects are too hard to reason so I didn't refactor it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right and we should do this change, it was probably historical.

But yeah, hard to reason about and see possible side-effects.


import React from 'react';
import routes from '@generated/routes';
import renderRoutes from './exports/renderRoutes';
import {BrowserContextProvider} from './exports/browserContext';
Expand All @@ -17,8 +20,6 @@ import BaseUrlIssueBanner from './baseUrlIssueBanner/BaseUrlIssueBanner';
import Root from '@theme/Root';
import Error from '@theme/Error';

import './client-lifecycles-dispatcher';

function App(): JSX.Element {
return (
<ErrorBoundary fallback={Error}>
Expand Down