@@ -10,7 +10,7 @@ import { moduleResolver as defaultModuleResolver, transpileAssets, wrapFetchWith
10
10
import { concat , isFunction , mergeWith } from 'lodash' ;
11
11
import type { ParcelConfigObject } from 'single-spa' ;
12
12
import getAddOns from '../addons' ;
13
- import { QiankunError } from '../error ' ;
13
+ import { QiankunError } from '@qiankunjs/shared ' ;
14
14
import type { AppConfiguration , LifeCycleFn , LifeCycles , LoadableApp , MicroAppLifeCycles , ObjectType } from '../types' ;
15
15
import {
16
16
getPureHTMLStringWithoutScripts ,
@@ -94,7 +94,8 @@ export default async function loadApp<T extends ObjectType>(
94
94
await execHooksChain ( toArray ( beforeLoad ) , app , global ) ;
95
95
96
96
const lifecycles = await lifecyclesPromise ;
97
- if ( ! lifecycles ) throw new QiankunError ( `${ appName } entry ${ entry } load failed as it not export lifecycles` ) ;
97
+ if ( ! lifecycles )
98
+ throw new QiankunError ( 5 , `${ appName } entry ${ entry } load failed as it not export lifecycles` , appName , entry ) ;
98
99
const { bootstrap, mount, unmount, update } = getLifecyclesFromExports (
99
100
lifecycles ,
100
101
appName ,
@@ -235,7 +236,7 @@ function getLifecyclesFromExports(
235
236
return globalVariableExports ;
236
237
}
237
238
238
- throw new QiankunError ( `You need to export lifecycle functions in ${ appName } entry` ) ;
239
+ throw new QiankunError ( 6 , `You need to export lifecycle functions in ${ appName } entry` , appName ) ;
239
240
}
240
241
241
242
function calcPublicPath ( entry : string ) : string {
0 commit comments