blob: 957801320c964c70c12f0d0c9011ec328b62ad99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import createFlash from '~/flash';
import { __ } from '~/locale';
const ERROR = __('An error occurred while rendering the linter');
document.addEventListener('DOMContentLoaded', () => {
if (gon?.features?.ciLintVue) {
import(/* webpackChunkName: 'ciLintIndex' */ '~/ci_lint/index')
.then(module => module.default())
.catch(() => createFlash(ERROR));
} else {
import(/* webpackChunkName: 'ciLintEditor' */ '../ci_lint_editor')
// eslint-disable-next-line new-cap
.then(module => new module.default())
.catch(() => createFlash(ERROR));
}
});
|