@@ -457,18 +457,18 @@ export class Project {
457
457
}
458
458
459
459
private async _loadConfig ( ) {
460
- const { ALEPH_IMPORT_MAP } = globalThis as any
461
- if ( ALEPH_IMPORT_MAP ) {
462
- const { imports } = ALEPH_IMPORT_MAP
463
- Object . assign ( this . importMap , { imports : Object . assign ( { } , this . importMap . imports , imports ) } )
464
- }
465
-
466
460
const importMapFile = path . join ( this . appRoot , 'import_map.json' )
467
461
if ( existsFileSync ( importMapFile ) ) {
468
462
const { imports } = JSON . parse ( await Deno . readTextFile ( importMapFile ) )
469
463
Object . assign ( this . importMap , { imports : Object . assign ( { } , this . importMap . imports , imports ) } )
470
464
}
471
465
466
+ const { ALEPH_IMPORT_MAP } = globalThis as any
467
+ if ( ALEPH_IMPORT_MAP ) {
468
+ const { imports } = ALEPH_IMPORT_MAP
469
+ Object . assign ( this . importMap , { imports : Object . assign ( { } , this . importMap . imports , imports ) } )
470
+ }
471
+
472
472
const config : Record < string , any > = { }
473
473
for ( const name of Array . from ( [ 'aleph.config' , 'config' ] ) . map ( name => [ 'ts' , 'js' , 'mjs' , 'json' ] . map ( ext => `${ name } .${ ext } ` ) ) . flat ( ) ) {
474
474
const p = path . join ( this . appRoot , name )
@@ -687,7 +687,7 @@ export class Project {
687
687
log . info ( 'Start watching code changes...' )
688
688
for await ( const event of w ) {
689
689
for ( const p of event . paths ) {
690
- const path = util . cleanPath ( util . trimPrefix ( p , this . appRoot ) )
690
+ const path = util . cleanPath ( util . trimPrefix ( p , this . srcDir ) )
691
691
// handle `api` dir remove directly
692
692
const validated = ( ( ) => {
693
693
// ignore `.aleph` and output directories
0 commit comments