From 3c4df73faf2902c43d409f5269bd22a7f995cbae Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 2 Aug 2023 22:12:54 +0800 Subject: [PATCH] style: add BBCode component name to report load usage time --- client/web/plugins/com.msgbyte.bbcode/src/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/web/plugins/com.msgbyte.bbcode/src/index.tsx b/client/web/plugins/com.msgbyte.bbcode/src/index.tsx index 39447a21..fa021a3f 100644 --- a/client/web/plugins/com.msgbyte.bbcode/src/index.tsx +++ b/client/web/plugins/com.msgbyte.bbcode/src/index.tsx @@ -5,10 +5,14 @@ import { regMessageTextDecorators, } from '@capital/common'; +const PLUGIN_ID = 'com.msgbyte.bbcode'; + // 预加载 import('./render'); -const BBCode = Loadable(() => import('./render')); +const BBCode = Loadable(() => import('./render'), { + componentName: `${PLUGIN_ID}:renderComponent`, +}); let serialize: (bbcode: string) => string; import('./bbcode/serialize').then((module) => { serialize = module.bbcodeToPlainText;