Skip to content

Commit

Permalink
Change the imports of react-ace (#301)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Dominick <[email protected]>
  • Loading branch information
JoelChanZhiYang and RichDom2185 authored Apr 2, 2024
1 parent 15ba7a7 commit 1fc5d0f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/tabs/Repl/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
import { Button } from '@blueprintjs/core';
import { IconNames } from '@blueprintjs/icons';
import React from 'react';
import AceEditor from 'react-ace';

import { FONT_MESSAGE, MINIMUM_EDITOR_HEIGHT } from '../../bundles/repl/config';
import type { ProgrammableRepl } from '../../bundles/repl/programmable_repl';
import type { DebuggerContext } from '../../typings/type_helpers';
// If I use import for AceEditor it will cause runtime error and crash Source Academy when spawning tab in the new module building system.
// import AceEditor from 'react-ace';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const AceEditor = require('react-ace').default;

import 'ace-builds/src-noconflict/mode-javascript';
import 'ace-builds/src-noconflict/theme-twilight';
Expand Down

0 comments on commit 1fc5d0f

Please sign in to comment.