mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[WPS] Add changes made to static object. (#35221)
* feat: add changes to static * fix test * fix lint error
This commit is contained in:
parent
c1a9e2b043
commit
d17c14a550
10
types/webpack-plugin-serve/index.d.ts
vendored
10
types/webpack-plugin-serve/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for webpack-plugin-serve 0.7
|
||||
// Type definitions for webpack-plugin-serve 0.10
|
||||
// Project: https://github.com/shellscape/webpack-plugin-serve
|
||||
// Definitions by: Matheus Gonçalves da Silva <https://github.com/PlayMa256>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -18,6 +18,7 @@ import { Compiler } from 'webpack';
|
||||
import { Options as HistoryApiFallbackOptions } from 'connect-history-api-fallback';
|
||||
import { CompressOptions } from 'koa-compress';
|
||||
import { Options as KoaStaticOptions } from 'koa-static';
|
||||
import { Options as FastGlobOptions } from 'fast-glob';
|
||||
|
||||
export interface Builtins {
|
||||
proxy: (args: HttpProxyMiddlewareConfig) => Proxy;
|
||||
@ -28,6 +29,11 @@ export interface Builtins {
|
||||
four0four: (fn?: (ctx: Koa.Context) => void) => void;
|
||||
}
|
||||
|
||||
export interface StaticObject {
|
||||
glob?: string | string[];
|
||||
options?: FastGlobOptions;
|
||||
}
|
||||
|
||||
export interface WebpackPluginServeOptions {
|
||||
client?: {
|
||||
address?: string;
|
||||
@ -54,7 +60,7 @@ export interface WebpackPluginServeOptions {
|
||||
};
|
||||
port?: number | Promise<number>;
|
||||
progress?: boolean | 'minimal';
|
||||
static?: string | string[];
|
||||
static?: string | string[] | StaticObject;
|
||||
status?: boolean;
|
||||
waitForBuild?: boolean;
|
||||
}
|
||||
|
||||
6
types/webpack-plugin-serve/package.json
Normal file
6
types/webpack-plugin-serve/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"fast-glob": "^2.2.6"
|
||||
}
|
||||
}
|
||||
@ -37,3 +37,10 @@ const baseConfig = {
|
||||
};
|
||||
|
||||
const configWithServer = usage(baseConfig);
|
||||
|
||||
const newConfigWithGlobby = new WebpackPluginServe({
|
||||
static: {
|
||||
glob: ['dist/**/public'],
|
||||
options: { onlyDirectories: true }
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user