@umijs/bundler-webpack 4.0.0-rc.1 → 4.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/client/client.js +49 -35
- package/client/constants.js +3 -0
- package/compiled/autoprefixer/browserslist/index.d.ts +6 -0
- package/compiled/autoprefixer/index.js +3 -3
- package/compiled/autoprefixer/postcss/lib/at-rule.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/comment.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/declaration.d.ts +2 -2
- package/compiled/autoprefixer/postcss/lib/node.d.ts +2 -2
- package/compiled/autoprefixer/postcss/lib/rule.d.ts +1 -1
- package/compiled/autoprefixer/source-map-js/source-map.d.ts +99 -82
- package/compiled/babel-loader/index.js +2 -2
- package/compiled/copy-webpack-plugin/939.index.js +1171 -0
- package/compiled/copy-webpack-plugin/index.js +16 -10
- package/compiled/copy-webpack-plugin/package.json +1 -1
- package/compiled/css-minimizer-webpack-plugin/index.js +8 -2
- package/compiled/css-minimizer-webpack-plugin/minify.js +25 -11
- package/compiled/css-minimizer-webpack-plugin/package.json +1 -1
- package/compiled/css-minimizer-webpack-plugin/utils.js +225 -28
- package/compiled/cssnano/index.js +12 -11
- package/compiled/cssnano/package.json +1 -1
- package/compiled/express.d.ts +2 -0
- package/compiled/fork-ts-checker-webpack-plugin/index.js +14 -15
- package/compiled/http-proxy-middleware/dist/types.d.ts +5 -5
- package/compiled/http-proxy-middleware/http-proxy/index.d.ts +1 -1
- package/compiled/http-proxy-middleware/index.js +10 -10
- package/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +60 -8
- package/compiled/mini-css-extract-plugin/hmr/normalize-url.js +13 -1
- package/compiled/mini-css-extract-plugin/index.js +4523 -4036
- package/compiled/mini-css-extract-plugin/loader.js +179 -54
- package/compiled/mini-css-extract-plugin/package.json +1 -1
- package/compiled/mini-css-extract-plugin/utils.js +79 -23
- package/compiled/sass-loader/index.js +1 -1
- package/compiled/terser/index.js +1 -1
- package/compiled/terser-webpack-plugin/index.js +296 -297
- package/compiled/terser-webpack-plugin/minify.js +4 -2
- package/compiled/terser-webpack-plugin/package.json +1 -1
- package/compiled/terser-webpack-plugin/types/index.d.ts +180 -146
- package/compiled/terser-webpack-plugin/types/minify.d.ts +17 -0
- package/compiled/terser-webpack-plugin/types/utils.d.ts +1 -3
- package/compiled/terser-webpack-plugin/utils.js +9 -12
- package/compiled/webpack/index.js +9855 -4185
- package/compiled/webpack-dev-middleware/index.js +7 -7
- package/compiled/webpack-dev-middleware/package.json +1 -1
- package/compiled/webpack-manifest-plugin/index.js +1 -1
- package/compiled/webpack-sources/index.js +1 -1
- package/compiled/ws/index.d.ts +1 -2
- package/compiled/ws/index.js +1 -1
- package/dist/build.d.ts +2 -1
- package/dist/build.js +1 -1
- package/dist/client/client.js +7 -2
- package/dist/config/compressPlugin.js +6 -0
- package/dist/config/config.js +4 -3
- package/dist/config/cssRules.js +1 -1
- package/dist/config/detectDeadCode.d.ts +12 -0
- package/dist/config/detectDeadCode.js +120 -0
- package/dist/config/detectDeadCodePlugin.d.ts +9 -0
- package/dist/config/detectDeadCodePlugin.js +75 -0
- package/dist/config/javaScriptRules.js +7 -12
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +4 -1
- package/dist/dev.d.ts +1 -0
- package/dist/dev.js +13 -5
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5 -1
- package/dist/loader/swc.js +14 -18
- package/dist/plugins/ESBuildCSSMinifyPlugin.js +1 -3
- package/dist/plugins/ParcelCSSMinifyPlugin.d.ts +10 -0
- package/dist/plugins/ParcelCSSMinifyPlugin.js +75 -0
- package/dist/plugins/ProgressPlugin.js +2 -2
- package/dist/plugins/RuntimePublicPathPlugin.js +1 -1
- package/dist/requireHook.js +1 -1
- package/dist/schema.js +10 -6
- package/dist/server/server.d.ts +1 -2
- package/dist/server/server.js +27 -11
- package/dist/server/ws.d.ts +3 -2
- package/dist/swcPlugins/autoCSSModules.d.ts +7 -2
- package/dist/swcPlugins/autoCSSModules.js +14 -17
- package/dist/swcPlugins/changeImportFromString.d.ts +2 -0
- package/dist/swcPlugins/changeImportFromString.js +10 -0
- package/dist/swcPlugins/lockCoreJS.d.ts +1 -1
- package/dist/swcPlugins/lockCoreJS.js +3 -2
- package/dist/types.d.ts +16 -12
- package/dist/types.js +1 -0
- package/dist/utils/depMatch.js +1 -1
- package/dist/utils/server.d.ts +5 -0
- package/dist/utils/server.js +93 -0
- package/package.json +38 -41
- package/compiled/css-loader/LICENSE +0 -20
- package/compiled/css-loader/api.js +0 -102
- package/compiled/css-loader/getUrl.js +0 -29
- package/compiled/css-loader/index.js +0 -2
- package/compiled/css-loader/noSourceMaps.js +0 -5
- package/compiled/css-loader/package.json +0 -1
- package/compiled/css-loader/sourceMaps.js +0 -22
- package/compiled/express/LICENSE +0 -24
- package/compiled/express/body-parser/index.d.ts +0 -104
- package/compiled/express/connect/index.d.ts +0 -93
- package/compiled/express/express-serve-static-core/index.d.ts +0 -1252
- package/compiled/express/index.d.ts +0 -133
- package/compiled/express/index.js +0 -338
- package/compiled/express/mime/index.d.ts +0 -35
- package/compiled/express/package.json +0 -1
- package/compiled/express/qs/index.d.ts +0 -62
- package/compiled/express/range-parser/index.d.ts +0 -35
- package/compiled/express/serve-static/index.d.ts +0 -108
- package/compiled/less/index.js +0 -31
- package/compiled/less/package.json +0 -1
- package/dist/esbuildHandler/autoCssModules.d.ts +0 -2
- package/dist/esbuildHandler/autoCssModules.js +0 -23
- package/dist/loader/esbuild.d.ts +0 -5
- package/dist/loader/esbuild.js +0 -53
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// Type definitions for body-parser 1.19
|
|
2
|
-
// Project: https://github.com/expressjs/body-parser
|
|
3
|
-
// Definitions by: Santi Albo <https://github.com/santialbo>
|
|
4
|
-
// Vilic Vane <https://github.com/vilic>
|
|
5
|
-
// Jonathan Häberle <https://github.com/dreampulse>
|
|
6
|
-
// Gevik Babakhani <https://github.com/blendsdk>
|
|
7
|
-
// Tomasz Łaziuk <https://github.com/tlaziuk>
|
|
8
|
-
// Jason Walton <https://github.com/jwalton>
|
|
9
|
-
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
10
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
11
|
-
|
|
12
|
-
/// <reference types="node" />
|
|
13
|
-
|
|
14
|
-
import { NextHandleFunction } from '../connect';
|
|
15
|
-
import * as http from 'http';
|
|
16
|
-
|
|
17
|
-
// for docs go to https://github.com/expressjs/body-parser/tree/1.19.0#body-parser
|
|
18
|
-
|
|
19
|
-
/** @deprecated */
|
|
20
|
-
declare function bodyParser(
|
|
21
|
-
options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded,
|
|
22
|
-
): NextHandleFunction;
|
|
23
|
-
|
|
24
|
-
declare namespace bodyParser {
|
|
25
|
-
interface Options {
|
|
26
|
-
/** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */
|
|
27
|
-
inflate?: boolean | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Controls the maximum request body size. If this is a number,
|
|
30
|
-
* then the value specifies the number of bytes; if it is a string,
|
|
31
|
-
* the value is passed to the bytes library for parsing. Defaults to '100kb'.
|
|
32
|
-
*/
|
|
33
|
-
limit?: number | string | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* The type option is used to determine what media type the middleware will parse
|
|
36
|
-
*/
|
|
37
|
-
type?: string | string[] | ((req: http.IncomingMessage) => any) | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* The verify option, if supplied, is called as verify(req, res, buf, encoding),
|
|
40
|
-
* where buf is a Buffer of the raw request body and encoding is the encoding of the request.
|
|
41
|
-
*/
|
|
42
|
-
verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
interface OptionsJson extends Options {
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* The reviver option is passed directly to JSON.parse as the second argument.
|
|
49
|
-
*/
|
|
50
|
-
reviver?(key: string, value: any): any;
|
|
51
|
-
/**
|
|
52
|
-
* When set to `true`, will only accept arrays and objects;
|
|
53
|
-
* when `false` will accept anything JSON.parse accepts. Defaults to `true`.
|
|
54
|
-
*/
|
|
55
|
-
strict?: boolean | undefined;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
interface OptionsText extends Options {
|
|
59
|
-
/**
|
|
60
|
-
* Specify the default character set for the text content if the charset
|
|
61
|
-
* is not specified in the Content-Type header of the request.
|
|
62
|
-
* Defaults to `utf-8`.
|
|
63
|
-
*/
|
|
64
|
-
defaultCharset?: string | undefined;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
interface OptionsUrlencoded extends Options {
|
|
68
|
-
/**
|
|
69
|
-
* The extended option allows to choose between parsing the URL-encoded data
|
|
70
|
-
* with the querystring library (when `false`) or the qs library (when `true`).
|
|
71
|
-
*/
|
|
72
|
-
extended?: boolean | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* The parameterLimit option controls the maximum number of parameters
|
|
75
|
-
* that are allowed in the URL-encoded data. If a request contains more parameters than this value,
|
|
76
|
-
* a 413 will be returned to the client. Defaults to 1000.
|
|
77
|
-
*/
|
|
78
|
-
parameterLimit?: number | undefined;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Returns middleware that only parses json and only looks at requests
|
|
83
|
-
* where the Content-Type header matches the type option.
|
|
84
|
-
*/
|
|
85
|
-
function json(options?: OptionsJson): NextHandleFunction;
|
|
86
|
-
/**
|
|
87
|
-
* Returns middleware that parses all bodies as a Buffer and only looks at requests
|
|
88
|
-
* where the Content-Type header matches the type option.
|
|
89
|
-
*/
|
|
90
|
-
function raw(options?: Options): NextHandleFunction;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Returns middleware that parses all bodies as a string and only looks at requests
|
|
94
|
-
* where the Content-Type header matches the type option.
|
|
95
|
-
*/
|
|
96
|
-
function text(options?: OptionsText): NextHandleFunction;
|
|
97
|
-
/**
|
|
98
|
-
* Returns middleware that only parses urlencoded bodies and only looks at requests
|
|
99
|
-
* where the Content-Type header matches the type option
|
|
100
|
-
*/
|
|
101
|
-
function urlencoded(options?: OptionsUrlencoded): NextHandleFunction;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export = bodyParser;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// Type definitions for connect v3.4.0
|
|
2
|
-
// Project: https://github.com/senchalabs/connect
|
|
3
|
-
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
|
|
4
|
-
// Evan Hahn <https://github.com/EvanHahn>
|
|
5
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
6
|
-
|
|
7
|
-
/// <reference types="node" />
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import * as http from 'http';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Create a new connect server.
|
|
14
|
-
*/
|
|
15
|
-
declare function createServer(): createServer.Server;
|
|
16
|
-
|
|
17
|
-
declare namespace createServer {
|
|
18
|
-
export type ServerHandle = HandleFunction | http.Server;
|
|
19
|
-
|
|
20
|
-
export class IncomingMessage extends http.IncomingMessage {
|
|
21
|
-
originalUrl?: http.IncomingMessage["url"] | undefined;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
type NextFunction = (err?: any) => void;
|
|
25
|
-
|
|
26
|
-
export type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void;
|
|
27
|
-
export type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
|
|
28
|
-
export type ErrorHandleFunction = (err: any, req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
|
|
29
|
-
export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
|
|
30
|
-
|
|
31
|
-
export interface ServerStackItem {
|
|
32
|
-
route: string;
|
|
33
|
-
handle: ServerHandle;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface Server extends NodeJS.EventEmitter {
|
|
37
|
-
(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
|
|
38
|
-
|
|
39
|
-
route: string;
|
|
40
|
-
stack: ServerStackItem[];
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Utilize the given middleware `handle` to the given `route`,
|
|
44
|
-
* defaulting to _/_. This "route" is the mount-point for the
|
|
45
|
-
* middleware, when given a value other than _/_ the middleware
|
|
46
|
-
* is only effective when that segment is present in the request's
|
|
47
|
-
* pathname.
|
|
48
|
-
*
|
|
49
|
-
* For example if we were to mount a function at _/admin_, it would
|
|
50
|
-
* be invoked on _/admin_, and _/admin/settings_, however it would
|
|
51
|
-
* not be invoked for _/_, or _/posts_.
|
|
52
|
-
*/
|
|
53
|
-
use(fn: NextHandleFunction): Server;
|
|
54
|
-
use(fn: HandleFunction): Server;
|
|
55
|
-
use(route: string, fn: NextHandleFunction): Server;
|
|
56
|
-
use(route: string, fn: HandleFunction): Server;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Handle server requests, punting them down
|
|
60
|
-
* the middleware stack.
|
|
61
|
-
*/
|
|
62
|
-
handle(req: http.IncomingMessage, res: http.ServerResponse, next: Function): void;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Listen for connections.
|
|
66
|
-
*
|
|
67
|
-
* This method takes the same arguments
|
|
68
|
-
* as node's `http.Server#listen()`.
|
|
69
|
-
*
|
|
70
|
-
* HTTP and HTTPS:
|
|
71
|
-
*
|
|
72
|
-
* If you run your application both as HTTP
|
|
73
|
-
* and HTTPS you may wrap them individually,
|
|
74
|
-
* since your Connect "server" is really just
|
|
75
|
-
* a JavaScript `Function`.
|
|
76
|
-
*
|
|
77
|
-
* var connect = require('connect')
|
|
78
|
-
* , http = require('http')
|
|
79
|
-
* , https = require('https');
|
|
80
|
-
*
|
|
81
|
-
* var app = connect();
|
|
82
|
-
*
|
|
83
|
-
* http.createServer(app).listen(80);
|
|
84
|
-
* https.createServer(options, app).listen(443);
|
|
85
|
-
*/
|
|
86
|
-
listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
|
|
87
|
-
listen(port: number, hostname?: string, callback?: Function): http.Server;
|
|
88
|
-
listen(path: string, callback?: Function): http.Server;
|
|
89
|
-
listen(handle: any, listeningListener?: Function): http.Server;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export = createServer;
|