@@ -34,7 +34,7 @@ export default function htmlEntriesPlugin({ cwd, publicDir, publicPath } = {}) {
34
34
35
35
/** @this {import('rollup').PluginContext} */
36
36
async function handleHtmlEntry ( id ) {
37
- if ( ! / \. h t m l $ / . test ( id ) ) return id ;
37
+ if ( ! / \. h t m l ? $ / . test ( id ) ) return id ;
38
38
39
39
this . addWatchFile ( id ) ;
40
40
const resolved = await this . resolve ( id , undefined , { skipSelf : true } ) ;
@@ -131,7 +131,7 @@ export default function htmlEntriesPlugin({ cwd, publicDir, publicPath } = {}) {
131
131
const scripts = await Promise . all ( entries . map ( handleHtmlEntry . bind ( this ) ) ) ;
132
132
opts . input = scripts . flat ( ) ;
133
133
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 ) ) ;
135
135
136
136
let desc = htmlEntries . slice ( 0 , 3 ) . join ( ', ' ) ;
137
137
if ( htmlEntries . length > 3 ) desc += ` (+${ htmlEntries . length - 3 } more)` ;
@@ -146,7 +146,7 @@ export default function htmlEntriesPlugin({ cwd, publicDir, publicPath } = {}) {
146
146
async generateBundle ( _ , bundle ) {
147
147
for ( const id in bundle ) {
148
148
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 ;
150
150
151
151
/** @type {ExtendedAsset } */
152
152
const htmlAsset = Object . assign ( thisAsset , {
0 commit comments