Skip to content

Commit

Permalink
Merge pull request #24 from grafana/bohandley/monaco-fix
Browse files Browse the repository at this point in the history
Monaco editor lazy load hack
  • Loading branch information
bohandley authored Oct 23, 2023
2 parents a0fd7a8 + eab3a86 commit 1e865ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/monaco-query-field/MonacoQueryFieldLazy.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React, { Suspense } from 'react';

import MonacoQueryField from './MonacoQueryField';
import { Props } from './MonacoQueryFieldProps';

const Field = React.lazy(() => import(/* webpackChunkName: "prom-query-field" */ './MonacoQueryField'));
// const Field = React.lazy(() => import('./MonacoQueryField'));

export const MonacoQueryFieldLazy = (props: Props) => {
return (
<Suspense fallback={null}>
<Field {...props} />
<MonacoQueryField {...props} />
</Suspense>
);
};

0 comments on commit 1e865ba

Please sign in to comment.