Configure ace editor to not use blob worker

We don't rely on ace-editor using the blob worker
and leaving it on causes CSP errors.
This commit is contained in:
Jake McDermott 2021-04-05 15:35:14 -04:00
parent 775c0b02ee
commit 241f73ebf7
No known key found for this signature in database
GPG Key ID: 0E56ED990CDFCB4F

View File

@ -1,5 +1,7 @@
import React, { useEffect, useRef, useCallback } from 'react';
import { oneOf, bool, number, string, func, oneOfType } from 'prop-types';
import { config } from 'ace-builds';
import ReactAce from 'react-ace';
import 'ace-builds/src-noconflict/mode-json';
import 'ace-builds/src-noconflict/mode-javascript';
@ -11,6 +13,8 @@ import { t } from '@lingui/macro';
import styled from 'styled-components';
import debounce from '../../util/debounce';
config.set('loadWorkerFromBlob', false);
const LINE_HEIGHT = 24;
const PADDING = 12;