@lark-apaas/fullstack-rspack-preset 1.0.1-alpha.echarts.4 → 1.0.1-alpha.echarts.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,5 +33,14 @@ function resgisterEchartsTheme() {
|
|
|
33
33
|
isRegistered = true;
|
|
34
34
|
// 打包后main.js defer 执行,css会加载完成
|
|
35
35
|
(0, echarts_2.registerTheme)('ud', (0, registry_echarts_theme_1.getShadcnEChartsTheme)());
|
|
36
|
+
// 监听hmr更新完成之后重新注册主题
|
|
37
|
+
if (import.meta.webpackHot || module.hot) {
|
|
38
|
+
const hot = import.meta.webpackHot || module.hot;
|
|
39
|
+
hot.addStatusHandler(status => {
|
|
40
|
+
if (status === 'idle') {
|
|
41
|
+
(0, echarts_2.registerTheme)('ud', (0, registry_echarts_theme_1.getShadcnEChartsTheme)());
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
36
45
|
}
|
|
37
46
|
resgisterEchartsTheme();
|