Welcome to mirror list, hosted at ThFree Co, Russian Federation.

monaco_loader.js « ide « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 142a220097bf8f520ee9c296e38b48a8abef19d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import monacoContext from 'monaco-editor/dev/vs/loader';

monacoContext.require.config({
  paths: {
    vs: `${__webpack_public_path__}monaco-editor/vs`, // eslint-disable-line camelcase
  },
});

// ignore CDN config and use local assets path for service worker which cannot be cross-domain
const relativeRootPath = (gon && gon.relative_url_root) || '';
const monacoPath = `${relativeRootPath}/assets/webpack/monaco-editor/vs`;
window.MonacoEnvironment = { getWorkerUrl: () => `${monacoPath}/base/worker/workerMain.js` };

// eslint-disable-next-line no-underscore-dangle
window.__monaco_context__ = monacoContext;
export default monacoContext.require;