diff --git a/build/build.node.ts b/build/build.node.ts index 637535701f0..c82d8d44e5d 100644 --- a/build/build.node.ts +++ b/build/build.node.ts @@ -864,7 +864,7 @@ namespace $ { if( !bundle || bundle === 'readme.md' ) { res = res.concat( this.bundleReadmeMd( { path , exclude : [ 'web' ] } ) ) } - + if( !bundle || bundle === 'index.html' ) { res = res.concat( this.bundleIndexHtml( { path } ) ) } @@ -1302,14 +1302,23 @@ namespace $ { const start = Date.now() const html = pack.resolve( 'index.html' ) + const tree = pack.resolve( 'index.xml.tree' ) + const target = pack.resolve( '-/index.html' ) + + if( tree.exists() ) { + const xml_tree = this.$.$mol_tree2_from_string( tree.text() ) + const text = this.$.$mol_tree2_xml_to_text( xml_tree ) + const xml = this.$.$mol_tree2_text_to_string( text ) + target.text( xml ) + } else if( html.exists() ) { + target.text( html.text() ) + } - if ( html.exists() ) { - const html_target = pack.resolve( '-/index.html' ) - html_target.text( html.text() ) - targets.push( html_target ) - this.logBundle( html_target , Date.now() - start ) + if( target.exists() ) { + targets.push( target ) + this.logBundle( target, Date.now() - start ) } - + return targets }