elisherer/webpack-dev-server-waitpage

custom excludes support

Closed this issue · 4 comments

Allow we replace req.method !== 'GET' at https://github.com/elisherer/webpack-dev-server-waitpage/blob/master/lib/index.js#L72

example:

webpackDevServerWaitpage(server, {
  excludes(req){
    return req.method !== 'GET' || req.url === 'xxx'
  }
})

Would it be better to check for req.headers.accept.includes('text/html') (guessing you have an ajax GET call you don't want it to get the html back)?

Yep, something like that, but might be more complicated. That's why I suggest provide a function, not an internal checker.

@Airkro, Added ignore to 2.1.0

The wait until bundle finished log shouldn't appear when something being ignored

forget it