修改编辑器cdn

This commit is contained in:
whyour
2022-02-20 21:36:01 +08:00
parent 7e34f4990d
commit 7ea9a8aa57
5 changed files with 84 additions and 13 deletions
+26
View File
@@ -0,0 +1,26 @@
import * as Sentry from '@sentry/react';
import { Integrations } from '@sentry/tracing';
import { loader } from '@monaco-editor/react';
import { version } from '../version';
export function init() {
// sentry监控 init
Sentry.init({
dsn: 'https://3406424fb1dc4813a62d39e844a9d0ac@o1098464.ingest.sentry.io/6122818',
integrations: [new Integrations.BrowserTracing()],
release: version,
tracesSampleRate: 1.0,
});
// monaco 编辑器配置cdn和locale
loader.config({
paths: {
vs: 'https://cdn.staticfile.org/monaco-editor/0.32.1/min/vs',
},
'vs/nls': {
availableLanguages: {
'*': 'zh-cn',
},
},
});
}