@@ -72,6 +72,10 @@ _.assign(module.exports.prototype, {
7272 conf = self . conf ,
7373 file = self . file ;
7474
75+ if ( file . subpath == '/courseDetail.html' ) {
76+ this . commonFileUri = ret . map . pkg [ 'common.min' ] . uri ;
77+ }
78+
7579 analysis = self . analyzeHtmlDepsAndAsync ( ) ;
7680 content = file . getContent ( ) ;
7781 // 插入css
@@ -131,7 +135,6 @@ _.assign(module.exports.prototype, {
131135
132136 requires = requires . concat ( obtainStyleFileIds ) ;
133137 requires . forEach ( function ( fileId ) { // 同步资源
134- if ( ~ conf . ignore . indexOf ( fileId ) ) return ;
135138 if ( HTTP_REG . test ( fileId ) ) return ;
136139 if ( ! pageDepMap [ fileId ] ) {
137140 pageDepMap [ fileId ] = self . calFileDepsFromId ( fileId , pageRes ) ;
@@ -161,7 +164,6 @@ _.assign(module.exports.prototype, {
161164 // - 3.1. 把url替换require.loadUrl里面的模块名
162165 // - 3.2. 在回调里面通过require获取模块
163166 loadUrls . concat ( asyncs ) . forEach ( function ( fileId ) { // 异步资源
164- if ( ~ conf . ignore . indexOf ( fileId ) ) return ;
165167 if ( HTTP_REG . test ( fileId ) ) return ;
166168 if ( ! pageDepMap [ fileId ] ) {
167169 pageDepMap [ fileId ] = self . calFileDepsFromId ( fileId , pageRes ) ;
@@ -611,7 +613,7 @@ _.assign(module.exports.prototype, {
611613 } ) ;
612614
613615 resourceMap . pkg [ pName ] = {
614- url : ( ret . map . pkg [ combinedId ] || { } ) . uri
616+ url : combinedId == 'common.min' ? self . commonFileUri : ( ret . map . pkg [ combinedId ] || { } ) . uri
615617 } ; // todo do i need to add deps?
616618 index ++ ;
617619 } ) ;
@@ -676,7 +678,7 @@ _.assign(module.exports.prototype, {
676678 subpath ,
677679 mainScriptFile ;
678680
679- if ( conf . outputResourceMapToMainJs ) {
681+ if ( conf . outputResourceMapToMainJs && this . file . extras . loadUrls ) {
680682 if ( ! this . mainScriptId ) {
681683 this . getMainJs ( ) ;
682684 }
0 commit comments