File tree 1 file changed +15
-4
lines changed
client/packages/lowcoder/src/comps/comps/remoteComp
1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,23 @@ async function npmLoader(remoteInfo: RemoteCompInfo): Promise<CompConstructor |
7
7
// log.info("load npm plugin:", remoteInfo);
8
8
const { packageName, packageVersion = "latest" , compName } = remoteInfo ;
9
9
const entry = `${ NPM_PLUGIN_ASSETS_BASE_URL } /${ packageName } @${ packageVersion } /index.js` ;
10
- const module = await import ( /* @vite -ignore */ entry ) ;
11
- const comp = module . default ?. [ compName ] ;
12
- if ( ! comp ) {
10
+ console . log ( "Entry" , entry ) ;
11
+ try {
12
+ const module = await import ( /* webpackIgnore: true */ entry ) ;
13
+ // let module = moduleGlobe;
14
+ // if (packageName !== "openblocks-comps-workmeet") {
15
+ // module = await import(entry);
16
+ // }
17
+ console . log ( "Entry 1" , module ) ;
18
+ const comp = module . default ?. [ compName ] ;
19
+ if ( ! comp ) {
20
+ throw new Error ( trans ( "npm.compNotFound" , { compName } ) ) ;
21
+ }
22
+ return comp ;
23
+ } catch ( e ) {
24
+ console . log ( "eeeee" , e ) ;
13
25
throw new Error ( trans ( "npm.compNotFound" , { compName } ) ) ;
14
26
}
15
- return comp ;
16
27
}
17
28
18
29
async function bundleLoader ( remoteInfo : RemoteCompInfo ) : Promise < CompConstructor | null > {
You can’t perform that action at this time.
0 commit comments