Force the bundler to build the player as its own file

This commit is contained in:
Gabe Kangas 2022-10-27 23:20:06 -07:00
parent 91edad5024
commit 2e7787f70b
No known key found for this signature in database
GPG key ID: 9A56337728BC81EA
2 changed files with 9 additions and 1 deletions

View file

@ -63,6 +63,8 @@ export const ChatUserMessage: FC<ChatUserMessageProps> = ({
);
}
// TODO: Find a solution to get rid of or replace "he" library since
// it's overly large for only use in this one place.
useEffect(() => {
setFormattedMessage(he.decode(body));
}, [message]);

View file

@ -18,7 +18,7 @@ import {
} from '../../stores/ClientConfigStore';
import { ClientConfig } from '../../../interfaces/client-config.model';
import { CustomPageContent } from '../CustomPageContent/CustomPageContent';
import { OwncastPlayer } from '../../video/OwncastPlayer/OwncastPlayer';
import styles from './Content.module.scss';
import { Sidebar } from '../Sidebar/Sidebar';
import { Footer } from '../Footer/Footer';
@ -41,6 +41,8 @@ import { FollowModal } from '../../modals/FollowModal/FollowModal';
const { Content: AntContent } = Layout;
// Lazy loaded components
const BrowserNotifyModal = dynamic(() =>
import('../../modals/BrowserNotifyModal/BrowserNotifyModal').then(mod => mod.BrowserNotifyModal),
);
@ -49,6 +51,10 @@ const NotifyReminderPopup = dynamic(() =>
import('../NotifyReminderPopup/NotifyReminderPopup').then(mod => mod.NotifyReminderPopup),
);
const OwncastPlayer = dynamic(() =>
import('../../video/OwncastPlayer/OwncastPlayer').then(mod => mod.OwncastPlayer),
);
// We only need to load the chat container here if we're in mobile or narrow
// windows, so lazy loading it makes sense.
const ChatContainer = dynamic(() =>