Split MUI and Emoji-Lib
460 ui.js: 4.44MB -> 3.94MB
This commit is contained in:
parent
c556b88f37
commit
bbdab2274a
1 changed files with 14 additions and 9 deletions
|
@ -2,15 +2,18 @@
|
||||||
import 'easymde/dist/easymde.min.css';
|
import 'easymde/dist/easymde.min.css';
|
||||||
import { FF_MAX_CHARS_DEFAULT } from 'constants/form-field';
|
import { FF_MAX_CHARS_DEFAULT } from 'constants/form-field';
|
||||||
import { openEditorMenu, stopContextMenu } from 'util/context-menu';
|
import { openEditorMenu, stopContextMenu } from 'util/context-menu';
|
||||||
|
import { lazyImport } from 'util/lazyImport';
|
||||||
import * as ICONS from 'constants/icons';
|
import * as ICONS from 'constants/icons';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import MarkdownPreview from 'component/common/markdown-preview';
|
import MarkdownPreview from 'component/common/markdown-preview';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOMServer from 'react-dom/server';
|
import ReactDOMServer from 'react-dom/server';
|
||||||
import SimpleMDE from 'react-simplemde-editor';
|
import SimpleMDE from 'react-simplemde-editor';
|
||||||
import TextareaWithSuggestions from 'component/textareaWithSuggestions';
|
|
||||||
import type { ElementRef, Node } from 'react';
|
import type { ElementRef, Node } from 'react';
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
|
const TextareaWithSuggestions = lazyImport(() => import('component/textareaWithSuggestions' /* webpackChunkName: "suggestions" */));
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
affixClass?: string, // class applied to prefix/postfix label
|
affixClass?: string, // class applied to prefix/postfix label
|
||||||
autoFocus?: boolean,
|
autoFocus?: boolean,
|
||||||
|
@ -247,6 +250,7 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
{...inputProps}
|
{...inputProps}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
<React.Suspense fallback={null}>
|
||||||
<TextareaWithSuggestions
|
<TextareaWithSuggestions
|
||||||
type={type}
|
type={type}
|
||||||
id={name}
|
id={name}
|
||||||
|
@ -255,6 +259,7 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
isLivestream={isLivestream}
|
isLivestream={isLivestream}
|
||||||
{...inputProps}
|
{...inputProps}
|
||||||
/>
|
/>
|
||||||
|
</React.Suspense>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="form-field__textarea-info">
|
<div className="form-field__textarea-info">
|
||||||
|
|
Loading…
Reference in a new issue