1
- export default JsonMinimizerPlugin ;
2
- export type Schema = import ( "schema-utils/declarations/validate" ) . Schema ;
3
- export type Compiler = import ( "webpack" ) . Compiler ;
4
- export type Compilation = import ( "webpack" ) . Compilation ;
5
- export type Asset = import ( "webpack" ) . Asset ;
6
- export type WebpackError = import ( "webpack" ) . WebpackError ;
7
- export type Rule = RegExp | string ;
8
- export type Rules = Rule [ ] | Rule ;
9
- export type JSONOptions = {
10
- replacer ?:
11
- | ( ( this : any , key : string , value : any ) => any | ( number | string ) [ ] | null )
12
- | undefined ;
13
- space ?: string | number | undefined ;
14
- } ;
15
- export type BasePluginOptions = {
16
- test ?: Rules | undefined ;
17
- include ?: Rules | undefined ;
18
- exclude ?: Rules | undefined ;
19
- minimizerOptions ?: JSONOptions | undefined ;
20
- } ;
21
- export type MinimizedResult = {
22
- code : string ;
23
- } ;
24
- export type InternalOptions = {
25
- input : string ;
26
- minimizerOptions ?: JSONOptions | undefined ;
27
- } ;
28
- export type InternalPluginOptions = BasePluginOptions ;
1
+ export = JsonMinimizerPlugin ;
29
2
/** @typedef {import("schema-utils/declarations/validate").Schema } Schema */
30
3
/** @typedef {import("webpack").Compiler } Compiler */
31
4
/** @typedef {import("webpack").Compilation } Compilation */
@@ -59,13 +32,12 @@ export type InternalPluginOptions = BasePluginOptions;
59
32
*/
60
33
declare class JsonMinimizerPlugin {
61
34
/**
62
- * @private
63
35
* @param {any } error
64
36
* @param {string } file
65
37
* @param {string } context
66
38
* @returns {Error }
67
39
*/
68
- private static buildError ;
40
+ static buildError ( error : any , file : string , context : string ) : Error ;
69
41
/**
70
42
* @param {BasePluginOptions } [options]
71
43
*/
@@ -89,3 +61,46 @@ declare class JsonMinimizerPlugin {
89
61
*/
90
62
apply ( compiler : Compiler ) : void ;
91
63
}
64
+ declare namespace JsonMinimizerPlugin {
65
+ export {
66
+ Schema ,
67
+ Compiler ,
68
+ Compilation ,
69
+ Asset ,
70
+ WebpackError ,
71
+ Rule ,
72
+ Rules ,
73
+ JSONOptions ,
74
+ BasePluginOptions ,
75
+ MinimizedResult ,
76
+ InternalOptions ,
77
+ InternalPluginOptions ,
78
+ } ;
79
+ }
80
+ type Compiler = import ( "webpack" ) . Compiler ;
81
+ type BasePluginOptions = {
82
+ test ?: Rules | undefined ;
83
+ include ?: Rules | undefined ;
84
+ exclude ?: Rules | undefined ;
85
+ minimizerOptions ?: JSONOptions | undefined ;
86
+ } ;
87
+ type Schema = import ( "schema-utils/declarations/validate" ) . Schema ;
88
+ type Compilation = import ( "webpack" ) . Compilation ;
89
+ type Asset = import ( "webpack" ) . Asset ;
90
+ type WebpackError = import ( "webpack" ) . WebpackError ;
91
+ type Rule = RegExp | string ;
92
+ type Rules = Rule [ ] | Rule ;
93
+ type JSONOptions = {
94
+ replacer ?:
95
+ | ( ( this : any , key : string , value : any ) => any | ( number | string ) [ ] | null )
96
+ | undefined ;
97
+ space ?: string | number | undefined ;
98
+ } ;
99
+ type MinimizedResult = {
100
+ code : string ;
101
+ } ;
102
+ type InternalOptions = {
103
+ input : string ;
104
+ minimizerOptions ?: JSONOptions | undefined ;
105
+ } ;
106
+ type InternalPluginOptions = BasePluginOptions ;
0 commit comments