@@ -34,7 +34,7 @@ export default function htmlEntriesPlugin({ cwd, publicDir, publicPath } = {}) {
3434
3535 /** @this {import('rollup').PluginContext} */
3636 async function handleHtmlEntry ( id ) {
37- if ( ! / \. h t m l $ / . test ( id ) ) return id ;
37+ if ( ! / \. h t m l ? $ / . test ( id ) ) return id ;
3838
3939 this . addWatchFile ( id ) ;
4040 const resolved = await this . resolve ( id , undefined , { skipSelf : true } ) ;
@@ -131,7 +131,7 @@ export default function htmlEntriesPlugin({ cwd, publicDir, publicPath } = {}) {
131131 const scripts = await Promise . all ( entries . map ( handleHtmlEntry . bind ( this ) ) ) ;
132132 opts . input = scripts . flat ( ) ;
133133 if ( opts . input . length === 0 ) {
134- const htmlEntries = entries . filter ( id => / \. h t m l $ / . test ( id ) ) ;
134+ const htmlEntries = entries . filter ( id => / \. h t m l ? $ / . test ( id ) ) ;
135135
136136 let desc = htmlEntries . slice ( 0 , 3 ) . join ( ', ' ) ;
137137 if ( htmlEntries . length > 3 ) desc += ` (+${ htmlEntries . length - 3 } more)` ;
@@ -146,7 +146,7 @@ export default function htmlEntriesPlugin({ cwd, publicDir, publicPath } = {}) {
146146 async generateBundle ( _ , bundle ) {
147147 for ( const id in bundle ) {
148148 const thisAsset = bundle [ id ] ;
149- if ( thisAsset . type !== 'asset' || ! / \. h t m l $ / . test ( thisAsset . fileName ) ) continue ;
149+ if ( thisAsset . type !== 'asset' || ! / \. h t m l ? $ / . test ( thisAsset . fileName ) ) continue ;
150150
151151 /** @type {ExtendedAsset } */
152152 const htmlAsset = Object . assign ( thisAsset , {
0 commit comments