Merge pull request #26219 from rynclark/patch-1

[webpack-serve] optional serve property and correct node api types
This commit is contained in:
Armando Aguirre
2018-06-05 15:44:22 -07:00
committed by GitHub
2 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -16,12 +16,12 @@ export = WebpackServe;
declare module 'webpack' {
interface Configuration {
serve: WebpackServe.Options;
serve?: WebpackServe.Options;
}
}
declare function WebpackServe(
{ config }: { config: WebpackServe.Options }
{ config }: { config: webpack.Configuration }
): Promise<WebpackServe.Instance>;
declare namespace WebpackServe {
+8 -6
View File
@@ -5,13 +5,15 @@ const compiler = webpack();
const server = serve({
config: {
http2: true,
dev: {
publicPath: '/',
logLevel: 'info'
serve: {
http2: true,
dev: {
publicPath: '/',
logLevel: 'info'
},
host: 'localhost'
},
host: 'localhost'
}
},
});
server