-
Notifications
You must be signed in to change notification settings - Fork 135
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
ui: Remove monorepo #355
ui: Remove monorepo #355
Conversation
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
Signed-off-by: Breezewish <me@breeswish.org>
static newReactSpaApp = function (rootComponentAsyncLoader, targetDomId) { | ||
const reactLifecycles = singleSpaReact({ | ||
React, | ||
ReactDOM, | ||
loadRootComponent: async () => { | ||
const component = await rootComponentAsyncLoader() | ||
if (component.default) { | ||
return component.default | ||
} | ||
return component | ||
}, | ||
domElementGetter: () => document.getElementById(targetDomId), | ||
}) | ||
return { | ||
bootstrap: [reactLifecycles.bootstrap], | ||
mount: [reactLifecycles.mount], | ||
unmount: [reactLifecycles.unmount], | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect!
import { Head } from '@lib/components' | ||
import { DateTime } from '@lib/components' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a big deal, but can be combined, same as the following line 7 and 9
import { Head } from '@lib/components' | ||
import { CardTableV2 } from '@lib/components' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark
import { Card, CardTableV2 } from '@lib/components' | ||
import client from '@lib/client' | ||
import { useClientRequest } from '@lib/utils/useClientRequest' | ||
import DateTime from '@lib/components/DateTime' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark
import client from '@lib/client' | ||
import { | ||
LogsearchCreateTaskGroupRequest, | ||
LogsearchSearchTarget, | ||
} from '@pingcap-incubator/dashboard_client' | ||
} from '@lib/client' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark
import client from '@lib/client' | ||
import { LogsearchSearchTarget, LogsearchTaskGroupResponse } from '@lib/client' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark
import client from '@lib/client' | ||
import { LogsearchTaskModel } from '@lib/client' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark
import client from '@lib/client' | ||
import { LogsearchSearchTarget, LogsearchTaskModel } from '@lib/client' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I did a global search & replace, so there will be some duplicate imports..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! so huge the work!
This PR removes the monorepo to make life easier.
Fix #324
Fix #280
Fix #269
Fix #170
Fix #75
Also fix:
@import '~antd/es/...
in packages@umijs/hooks
in packages