mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #46882 [@types/webpack-dev-middleware] Make publicPath Option Optional by @XxX-MLGNoob-XxX
* Make publicPath Option Optional * Add Test for Creating Instance with Empty Options Co-authored-by: XxX-MLGNoob-XxX <thomason.isaiah@yahoo.com>
This commit is contained in:
parent
992e59fb7b
commit
de112ddd85
2
types/webpack-dev-middleware/index.d.ts
vendored
2
types/webpack-dev-middleware/index.d.ts
vendored
@ -62,7 +62,7 @@ declare namespace WebpackDevMiddleware {
|
||||
*/
|
||||
mimeTypes?: MimeTypeMap | OverrideMimeTypeMap | null;
|
||||
/** The public path that the middleware is bound to */
|
||||
publicPath: string;
|
||||
publicPath?: string;
|
||||
/** Allows users to provide a custom reporter to handle logging within the module */
|
||||
reporter?: Reporter | null;
|
||||
/** Instructs the module to enable or disable the server-side rendering mode */
|
||||
|
||||
@ -3,9 +3,16 @@ import webpack = require('webpack');
|
||||
import webpackDevMiddleware = require('webpack-dev-middleware');
|
||||
|
||||
const compiler = webpack({});
|
||||
const compilerWithPublicPath = webpack({
|
||||
output: {
|
||||
publicPath: '/assets/'
|
||||
}
|
||||
});
|
||||
|
||||
let webpackDevMiddlewareInstance = webpackDevMiddleware(compiler);
|
||||
|
||||
webpackDevMiddlewareInstance = webpackDevMiddleware(compilerWithPublicPath, {});
|
||||
|
||||
webpackDevMiddlewareInstance = webpackDevMiddleware(compiler, {
|
||||
logLevel: 'silent',
|
||||
logTime: true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user