@lark-apaas/fullstack-rspack-preset 1.0.8 → 1.0.9
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.
- package/lib/overlay/index.js +12 -0
- package/package.json +1 -1
package/lib/overlay/index.js
CHANGED
|
@@ -226,12 +226,24 @@ function render() {
|
|
|
226
226
|
});
|
|
227
227
|
if (currentCompileErrorMessage) {
|
|
228
228
|
currentMode = 'compileError';
|
|
229
|
+
// 通知主应用,当前出现渲染报错
|
|
230
|
+
sendPostMessage({
|
|
231
|
+
type: 'RenderError',
|
|
232
|
+
location: window.location.href,
|
|
233
|
+
error: currentMode,
|
|
234
|
+
});
|
|
229
235
|
// 发送编译错误
|
|
230
236
|
logError(['Compile Error', currentCompileErrorMessage], currentMode);
|
|
231
237
|
ErrorContainer(rootDocument, root, '编译出错');
|
|
232
238
|
}
|
|
233
239
|
else if (currentRuntimeErrors.length) {
|
|
234
240
|
currentMode = 'runtimeError';
|
|
241
|
+
// 通知主应用,当前出现渲染报错
|
|
242
|
+
sendPostMessage({
|
|
243
|
+
type: 'RenderError',
|
|
244
|
+
location: window.location.href,
|
|
245
|
+
error: currentMode,
|
|
246
|
+
});
|
|
235
247
|
// 发送运行错误
|
|
236
248
|
logError(['Uncaught Render Error', ...currentRuntimeErrors], currentMode);
|
|
237
249
|
// 叠加全部报错,将报错信息发送到妙搭
|