Include support for contextual rewrite

This commit is contained in:
Igor Schelkonogov
2018-08-14 17:09:11 +05:00
committed by GitHub
parent 7a15941349
commit 4a8f29c946

View File

@@ -14,6 +14,7 @@ import * as express from 'express';
import * as serveStatic from 'serve-static';
import * as https from 'https';
import * as http from 'http';
import { Url } from "url";
declare namespace WebpackDevServer {
interface ListeningApp {
@@ -31,9 +32,16 @@ declare namespace WebpackDevServer {
type ProxyConfigArray = ProxyConfigArrayItem[];
interface Context {
match: RegExpMatchArray;
parsedUrl: Url;
}
type RewriteTo = (context: Context) => string;
interface Rewrite {
from: RegExp;
to: string;
to: string | RegExp | RewriteTo;
}
interface HistoryApiFallbackConfig {