File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
source/application/compiler/webpack Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " angular-ssr" ,
3
- "version" : " 0.10.17 " ,
3
+ "version" : " 0.10.18 " ,
4
4
"description" : " Angular server-side rendering implementation" ,
5
5
"main" : " build/index.js" ,
6
6
"typings" : " build/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -21,12 +21,14 @@ export class WebpackModuleLoader implements ModuleLoader {
21
21
throw new CompilerException ( `Cannot find a webpack chunk with the name ${ module . source } ` ) ;
22
22
}
23
23
24
- if ( matchingChunk . files == null ||
25
- matchingChunk . files . length !== 1 ) {
26
- throw new CompilerException ( `Chunk ${ module . source } does not have associated output files` ) ;
24
+ const js = ( matchingChunk . files || [ ] ) . filter ( f => / \. j s $ / . test ( f ) ) ;
25
+ switch ( js . length ) {
26
+ case 0 : throw new CompilerException ( `Chunk ${ module . source } does not have associated output files` ) ;
27
+ case 1 : break ;
28
+ default : throw new CompilerException ( `Chunk ${ module . source } has more than one JavaScript output: ${ js . join ( ', ' ) } ` ) ;
27
29
}
28
30
29
- const candidate = join ( this . project . workingPath . toString ( ) , matchingChunk . files [ 0 ] ) ;
31
+ const candidate = join ( this . project . workingPath . toString ( ) , js [ 0 ] ) ;
30
32
31
33
const loaded = require ( candidate ) ;
32
34
You can’t perform that action at this time.
0 commit comments