Skip to content

Commit a5cc70b

Browse files
committed
chore(livechat,gazzodown): Forcefully trim Livechat bundle size
1 parent dee1f32 commit a5cc70b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

packages/gazzodown/src/elements/LinkSpan.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type * as MessageParser from '@rocket.chat/message-parser';
2-
import { getBaseURI, isExternal } from '@rocket.chat/ui-client';
2+
import { getBaseURI, isExternal } from '@rocket.chat/ui-client/dist/helpers/getBaseURI';
33
import type { ReactElement } from 'react';
44
import { useMemo } from 'react';
55
import { useTranslation } from 'react-i18next';

packages/livechat/src/components/MarkdownBlock/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { parse } from '@rocket.chat/message-parser';
22
import { Suspense, lazy } from 'preact/compat';
33

4-
const Markup = lazy(async () => {
5-
const { Markup } = await import('@rocket.chat/gazzodown');
6-
return Markup;
7-
});
4+
const Markup = lazy(() => import('@rocket.chat/gazzodown/dist/Markup'));
85

96
const MarkdownBlock = ({ text, emoticons }: { text: string; emoticons?: boolean }) => {
107
return (

packages/livechat/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"react/jsx-runtime": ["../../node_modules/preact/jsx-runtime"],
1212
"react-dom": ["../../node_modules/preact/compat/"],
1313
"react-dom/*": ["../../node_modules/preact/compat/*"]
14-
}
14+
},
15+
"declaration": false,
16+
"declarationMap": false
1517
},
1618
"include": ["./src", "./webpack.config.ts", "./svg-component-loader.ts", ".storybook/**/*.ts"],
1719
"exclude": ["./node_modules", "./dist"]

0 commit comments

Comments
 (0)