File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/@apphosting/adapter-angular/src Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,17 @@ export const REQUIRED_BUILDER = "@angular-devkit/build-angular:application";
32
32
*/
33
33
export async function checkStandaloneBuildConditions ( cwd : string ) : Promise < void > {
34
34
// dynamically load Angular so this can be used in an NPX context
35
+ const angularCorePath = require . resolve ( "@angular/core" , { paths : [ cwd ] } ) ;
35
36
const { NodeJsAsyncHost } : typeof import ( "@angular-devkit/core/node" ) = await import (
36
- // TODO (sijinli): resolve paths under cwd to be safer later
37
- require . resolve ( "@angular-devkit/core/node/index.js" , { paths : [ cwd ] } )
37
+ require . resolve ( "@angular-devkit/core/node" , {
38
+ paths : [ cwd , angularCorePath ] ,
39
+ } )
38
40
) ;
39
41
const { workspaces } : typeof import ( "@angular-devkit/core" ) = await import (
40
- require . resolve ( "@angular-devkit/core/src/index.js" , { paths : [ cwd ] } )
42
+ require . resolve ( "@angular-devkit/core" , {
43
+ paths : [ cwd , angularCorePath ] ,
44
+ } )
41
45
) ;
42
-
43
46
const host = workspaces . createWorkspaceHost ( new NodeJsAsyncHost ( ) ) ;
44
47
const { workspace } = await workspaces . readWorkspace ( cwd , host ) ;
45
48
You can’t perform that action at this time.
0 commit comments