-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cloud/202312' into dev-4.2.3
- Loading branch information
Showing
7 changed files
with
81 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,27 +19,22 @@ import { setLocale } from '@umijs/max'; | |
import { initMetaStore } from './common/metaStore'; | ||
import DndHTML5Provider from './component/DndHTML5Provider'; | ||
import registerPlugins from './plugins/register'; | ||
import { haveOCP, isClient } from './util/env'; | ||
import { isClient } from './util/env'; | ||
import logger from './util/logger'; | ||
import { getRoute } from './util/tracert/userRoutes'; | ||
import { initIntl } from './util/intl'; | ||
import * as Sentry from "@sentry/react"; | ||
import { initSentry } from './util/sentry'; | ||
if (isClient()) { | ||
import('@sentry/electron').then((_Sentry) => { | ||
_Sentry.init({ | ||
dsn: 'https://[email protected]/3', | ||
}); | ||
}); | ||
} else if (haveOCP()) { | ||
Sentry.init({ | ||
dsn: "https://[email protected]/6" | ||
}); | ||
} else { | ||
initSentry() | ||
} | ||
|
||
|
||
|
||
|
||
|
||
// TODO: 非云上场景不应该 export qiankun | ||
export const qiankun = { | ||
// 应用加载之前 | ||
|
@@ -65,6 +60,7 @@ export const qiankun = { | |
}; | ||
|
||
export async function render(oldRender: () => void) { | ||
|
||
await initIntl(); | ||
registerPlugins(); | ||
await initMetaStore(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { haveOCP } from "./env"; | ||
import * as Sentry from "@sentry/react"; | ||
export function getSentry() { | ||
if (haveOCP()) { | ||
return Sentry; | ||
} | ||
} | ||
|
||
export function initSentry() { | ||
getSentry()?.init({ | ||
dsn: "https://[email protected]/6", | ||
debug: true, | ||
transport: Sentry.makeXHRTransport | ||
}); | ||
} |