rolaveric / karma-systemjs

Karma plugin for using SystemJS as a module loader
MIT License
40 stars 19 forks source link

bundles are not resolved correctly in 0.16.0 #86

Open jamesbrobb opened 7 years ago

jamesbrobb commented 7 years ago

I have bundles specified in my systemjs config and they work as expected using karma-systemjs 0.12.0

System.config({
    transpiler: 'typescript',
    bundles: {
        'my/feature': ['my/feature/files', 'my/feature/permissions', 'my/feature/query']
    },
    map: {
        'my/feature': 'node_modules/my.feature/bundles/my/feature.js',
        'typescript': 'node_modules/typescript/lib/typescript.js',
        'systemjs': 'node_modules/systemjs/dist/system.src.js'
    },
    ...
});

But I've just upgraded to version 0.16.0 and they no longer resolve correctly. Instead i get the following error:

04 01 2017 13:38:40.645:WARN [web-server]: 404: /base/node_modules/my.feature/bundles/my/feature.js/permissions.js
04 01 2017 13:38:40.650:WARN [web-server]: 404: /base/node_modules/my.feature/bundles/my/feature.js/query.js
04 01 2017 13:38:40.656:WARN [web-server]: 404: /base/node_modules/my.feature/bundles/my/feature.js/files.js

Which is the same error i get if i completely remove bundles from the systemjs config when using karma-systemjs 0.12.0.

I've gone backwards through the karma-systemjs versions to see at which point this issue was introduced and have found that 0.15.0 works as expected. So it looks like this issue was introduced in 0.16.0.

I've also tried adding useBundles: 'true' to my config (although i may have misunderstood its usage), but this didn't fix the issue.

jcestibariz commented 7 years ago

@jamesbrobb your problem may be caused by the same reason as #92. Can you check if that change fixes your problem too?