File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,10 @@ var FuseBoxAureliaLoader = (function (_super) {
262262 var resources = Object . keys ( FuseBox . packages [ moduleId ] . f ) ;
263263 var resourceName_1 = path . replace ( moduleId + "/" , '' ) ;
264264 var resourceEntry = resources . find ( function ( r ) { return r . endsWith ( resourceName_1 + '.js' ) ; } ) ;
265+ var resourceEntryCheck = resources . find ( function ( r ) { return r . endsWith ( '/' + resourceName_1 + '.js' ) ; } ) ;
266+ if ( resourceEntry !== resourceEntryCheck ) {
267+ resourceEntry = resourceEntryCheck ;
268+ }
265269 retunValue = moduleId + "/" + resourceEntry ;
266270 }
267271 if ( ! this . fuseBoxExist ( retunValue ) ) {
Original file line number Diff line number Diff line change @@ -348,6 +348,13 @@ export class FuseBoxAureliaLoader extends Loader {
348348 let resources = Object . keys ( FuseBox . packages [ moduleId ] . f ) ;
349349 let resourceName = path . replace ( `${ moduleId } /` , '' ) ;
350350 let resourceEntry = resources . find ( r => r . endsWith ( resourceName + '.js' ) ) ;
351+
352+ // fix for if resources is ending the same... this will fail if many sub folders and same file name
353+ // todo: improve, get root of package commonjs file to be sure.
354+ let resourceEntryCheck = resources . find ( r => r . endsWith ( '/' + resourceName + '.js' ) ) ;
355+ if ( resourceEntry !== resourceEntryCheck ) {
356+ resourceEntry = resourceEntryCheck ;
357+ }
351358 retunValue = `${ moduleId } /${ resourceEntry } ` ;
352359 }
353360
You can’t perform that action at this time.
0 commit comments