@doracli/esbuild 0.0.5 → 0.0.8

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.
@@ -1,123 +1,19 @@
1
- import type * as esbuild from 'esbuild';
2
- import type {
3
- BuildOptions,
4
- BuildResult,
5
- ServeOptions,
6
- ServeResult,
7
- WatchOptions,
8
- } from 'esbuild';
1
+ import * as esbuild from 'esbuild';
2
+ import { BuildOptions, BuildResult, ServeResult, WatchOptions, ServeOptions } from 'esbuild';
9
3
  export { BuildOptions } from 'esbuild';
10
- import type { TOnionFun } from '@cclr/utils';
11
- import type { ConfigCtx } from '@doracli/helper';
12
- import { CompilerBase } from '@doracli/helper';
13
- import type { TCdn, TDoraConfig } from '@doracli/type';
4
+ import { CompilerBase, ConfigCtx } from '@doracli/helper';
5
+ import { TCdn, TDoraConfig } from '@doracli/type';
6
+ import { TOnionFun } from '@cclr/utils';
14
7
 
15
- declare const builder: (
16
- config: BuildOptions
17
- ) => Promise<esbuild.BuildResult<BuildOptions>>;
8
+ declare const builder: (config: BuildOptions) => Promise<esbuild.BuildResult<BuildOptions>>;
18
9
 
19
- declare class Compiler extends CompilerBase<
20
- BuildOptions,
21
- {
10
+ declare class Compiler extends CompilerBase<BuildOptions, {
22
11
  build: Promise<BuildResult<BuildOptions>>;
23
12
  watch: Promise<void>;
24
13
  server: Promise<ServeResult>;
25
- }
26
- > {
27
- constructor(config: Partial<BuildOptions>);
28
- inOutMap: (inputOutputMap: Record<string, string>) => Promise<
29
- BuildResult<{
30
- bundle?: boolean;
31
- splitting?: boolean;
32
- preserveSymlinks?: boolean;
33
- outfile?: string;
34
- metafile?: boolean;
35
- outdir?: string;
36
- outbase?: string;
37
- external?: string[];
38
- packages?: 'bundle' | 'external';
39
- alias?: Record<string, string>;
40
- loader?: {
41
- [ext: string]: esbuild.Loader;
42
- };
43
- resolveExtensions?: string[];
44
- mainFields?: string[];
45
- conditions?: string[];
46
- write?: boolean;
47
- allowOverwrite?: boolean;
48
- tsconfig?: string;
49
- outExtension?: {
50
- [ext: string]: string;
51
- };
52
- publicPath?: string;
53
- entryNames?: string;
54
- chunkNames?: string;
55
- assetNames?: string;
56
- inject?: string[];
57
- banner?: {
58
- [type: string]: string;
59
- };
60
- footer?: {
61
- [type: string]: string;
62
- };
63
- entryPoints?:
64
- | (
65
- | string
66
- | {
67
- in: string;
68
- out: string;
69
- }
70
- )[]
71
- | Record<string, string>;
72
- stdin?: esbuild.StdinOptions;
73
- plugins?: esbuild.Plugin[];
74
- absWorkingDir?: string;
75
- nodePaths?: string[];
76
- sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
77
- legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
78
- sourceRoot?: string;
79
- sourcesContent?: boolean;
80
- format?: esbuild.Format;
81
- globalName?: string;
82
- target?: string | string[];
83
- supported?: Record<string, boolean>;
84
- platform?: esbuild.Platform;
85
- mangleProps?: RegExp;
86
- reserveProps?: RegExp;
87
- mangleQuoted?: boolean;
88
- mangleCache?: Record<string, string | false>;
89
- drop?: esbuild.Drop[];
90
- dropLabels?: string[];
91
- minify?: boolean;
92
- minifyWhitespace?: boolean;
93
- minifyIdentifiers?: boolean;
94
- minifySyntax?: boolean;
95
- lineLimit?: number;
96
- charset?: esbuild.Charset;
97
- treeShaking?: boolean;
98
- ignoreAnnotations?: boolean;
99
- jsx?: 'transform' | 'preserve' | 'automatic';
100
- jsxFactory?: string;
101
- jsxFragment?: string;
102
- jsxImportSource?: string;
103
- jsxDev?: boolean;
104
- jsxSideEffects?: boolean;
105
- define?: {
106
- [key: string]: string;
107
- };
108
- pure?: string[];
109
- keepNames?: boolean;
110
- absPaths?: esbuild.AbsPaths[];
111
- color?: boolean;
112
- logLevel?: esbuild.LogLevel;
113
- logLimit?: number;
114
- logOverride?: Record<string, esbuild.LogLevel>;
115
- tsconfigRaw?: string | esbuild.TsconfigRaw;
116
- }>
117
- >;
118
- context: (opt: BuildOptions) => Promise<{
119
- rebuild: () => Promise<
120
- BuildResult<{
14
+ }> {
15
+ constructor(config: Partial<BuildOptions>);
16
+ inOutMap: (inputOutputMap: Record<string, string>) => Promise<BuildResult<{
121
17
  bundle?: boolean;
122
18
  splitting?: boolean;
123
19
  preserveSymlinks?: boolean;
@@ -126,10 +22,10 @@ declare class Compiler extends CompilerBase<
126
22
  outdir?: string;
127
23
  outbase?: string;
128
24
  external?: string[];
129
- packages?: 'bundle' | 'external';
25
+ packages?: "bundle" | "external";
130
26
  alias?: Record<string, string>;
131
27
  loader?: {
132
- [ext: string]: esbuild.Loader;
28
+ [ext: string]: esbuild.Loader;
133
29
  };
134
30
  resolveExtensions?: string[];
135
31
  mainFields?: string[];
@@ -138,7 +34,7 @@ declare class Compiler extends CompilerBase<
138
34
  allowOverwrite?: boolean;
139
35
  tsconfig?: string;
140
36
  outExtension?: {
141
- [ext: string]: string;
37
+ [ext: string]: string;
142
38
  };
143
39
  publicPath?: string;
144
40
  entryNames?: string;
@@ -146,26 +42,21 @@ declare class Compiler extends CompilerBase<
146
42
  assetNames?: string;
147
43
  inject?: string[];
148
44
  banner?: {
149
- [type: string]: string;
45
+ [type: string]: string;
150
46
  };
151
47
  footer?: {
152
- [type: string]: string;
48
+ [type: string]: string;
153
49
  };
154
- entryPoints?:
155
- | (
156
- | string
157
- | {
158
- in: string;
159
- out: string;
160
- }
161
- )[]
162
- | Record<string, string>;
50
+ entryPoints?: (string | {
51
+ in: string;
52
+ out: string;
53
+ })[] | Record<string, string>;
163
54
  stdin?: esbuild.StdinOptions;
164
55
  plugins?: esbuild.Plugin[];
165
56
  absWorkingDir?: string;
166
57
  nodePaths?: string[];
167
- sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
168
- legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
58
+ sourcemap?: boolean | "linked" | "inline" | "external" | "both";
59
+ legalComments?: "none" | "inline" | "eof" | "linked" | "external";
169
60
  sourceRoot?: string;
170
61
  sourcesContent?: boolean;
171
62
  format?: esbuild.Format;
@@ -187,14 +78,14 @@ declare class Compiler extends CompilerBase<
187
78
  charset?: esbuild.Charset;
188
79
  treeShaking?: boolean;
189
80
  ignoreAnnotations?: boolean;
190
- jsx?: 'transform' | 'preserve' | 'automatic';
81
+ jsx?: "transform" | "preserve" | "automatic";
191
82
  jsxFactory?: string;
192
83
  jsxFragment?: string;
193
84
  jsxImportSource?: string;
194
85
  jsxDev?: boolean;
195
86
  jsxSideEffects?: boolean;
196
87
  define?: {
197
- [key: string]: string;
88
+ [key: string]: string;
198
89
  };
199
90
  pure?: string[];
200
91
  keepNames?: boolean;
@@ -204,115 +95,193 @@ declare class Compiler extends CompilerBase<
204
95
  logLimit?: number;
205
96
  logOverride?: Record<string, esbuild.LogLevel>;
206
97
  tsconfigRaw?: string | esbuild.TsconfigRaw;
207
- }>
208
- >;
209
- cancel: () => Promise<void>;
210
- }>;
211
- input: (input: string | string[]) => Promise<{
212
- output: (outputConfig: any) => Promise<BuildResult<BuildOptions>>;
213
- }>;
214
- build: (options: BuildOptions) => Promise<
215
- BuildResult<{
216
- bundle?: boolean;
217
- splitting?: boolean;
218
- preserveSymlinks?: boolean;
219
- outfile?: string;
220
- metafile?: boolean;
221
- outdir?: string;
222
- outbase?: string;
223
- external?: string[];
224
- packages?: 'bundle' | 'external';
225
- alias?: Record<string, string>;
226
- loader?: {
227
- [ext: string]: esbuild.Loader;
228
- };
229
- resolveExtensions?: string[];
230
- mainFields?: string[];
231
- conditions?: string[];
232
- write?: boolean;
233
- allowOverwrite?: boolean;
234
- tsconfig?: string;
235
- outExtension?: {
236
- [ext: string]: string;
237
- };
238
- publicPath?: string;
239
- entryNames?: string;
240
- chunkNames?: string;
241
- assetNames?: string;
242
- inject?: string[];
243
- banner?: {
244
- [type: string]: string;
245
- };
246
- footer?: {
247
- [type: string]: string;
248
- };
249
- entryPoints?:
250
- | (
251
- | string
252
- | {
98
+ }>>;
99
+ context: (opt: BuildOptions) => Promise<{
100
+ rebuild: () => Promise<BuildResult<{
101
+ bundle?: boolean;
102
+ splitting?: boolean;
103
+ preserveSymlinks?: boolean;
104
+ outfile?: string;
105
+ metafile?: boolean;
106
+ outdir?: string;
107
+ outbase?: string;
108
+ external?: string[];
109
+ packages?: "bundle" | "external";
110
+ alias?: Record<string, string>;
111
+ loader?: {
112
+ [ext: string]: esbuild.Loader;
113
+ };
114
+ resolveExtensions?: string[];
115
+ mainFields?: string[];
116
+ conditions?: string[];
117
+ write?: boolean;
118
+ allowOverwrite?: boolean;
119
+ tsconfig?: string;
120
+ outExtension?: {
121
+ [ext: string]: string;
122
+ };
123
+ publicPath?: string;
124
+ entryNames?: string;
125
+ chunkNames?: string;
126
+ assetNames?: string;
127
+ inject?: string[];
128
+ banner?: {
129
+ [type: string]: string;
130
+ };
131
+ footer?: {
132
+ [type: string]: string;
133
+ };
134
+ entryPoints?: (string | {
253
135
  in: string;
254
136
  out: string;
255
- }
256
- )[]
257
- | Record<string, string>;
258
- stdin?: esbuild.StdinOptions;
259
- plugins?: esbuild.Plugin[];
260
- absWorkingDir?: string;
261
- nodePaths?: string[];
262
- sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
263
- legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
264
- sourceRoot?: string;
265
- sourcesContent?: boolean;
266
- format?: esbuild.Format;
267
- globalName?: string;
268
- target?: string | string[];
269
- supported?: Record<string, boolean>;
270
- platform?: esbuild.Platform;
271
- mangleProps?: RegExp;
272
- reserveProps?: RegExp;
273
- mangleQuoted?: boolean;
274
- mangleCache?: Record<string, string | false>;
275
- drop?: esbuild.Drop[];
276
- dropLabels?: string[];
277
- minify?: boolean;
278
- minifyWhitespace?: boolean;
279
- minifyIdentifiers?: boolean;
280
- minifySyntax?: boolean;
281
- lineLimit?: number;
282
- charset?: esbuild.Charset;
283
- treeShaking?: boolean;
284
- ignoreAnnotations?: boolean;
285
- jsx?: 'transform' | 'preserve' | 'automatic';
286
- jsxFactory?: string;
287
- jsxFragment?: string;
288
- jsxImportSource?: string;
289
- jsxDev?: boolean;
290
- jsxSideEffects?: boolean;
291
- define?: {
292
- [key: string]: string;
293
- };
294
- pure?: string[];
295
- keepNames?: boolean;
296
- absPaths?: esbuild.AbsPaths[];
297
- color?: boolean;
298
- logLevel?: esbuild.LogLevel;
299
- logLimit?: number;
300
- logOverride?: Record<string, esbuild.LogLevel>;
301
- tsconfigRaw?: string | esbuild.TsconfigRaw;
302
- }>
303
- >;
304
- watch: (options: WatchOptions) => Promise<void>;
305
- server: (serverConfig: ServeOptions) => Promise<ServeResult>;
137
+ })[] | Record<string, string>;
138
+ stdin?: esbuild.StdinOptions;
139
+ plugins?: esbuild.Plugin[];
140
+ absWorkingDir?: string;
141
+ nodePaths?: string[];
142
+ sourcemap?: boolean | "linked" | "inline" | "external" | "both";
143
+ legalComments?: "none" | "inline" | "eof" | "linked" | "external";
144
+ sourceRoot?: string;
145
+ sourcesContent?: boolean;
146
+ format?: esbuild.Format;
147
+ globalName?: string;
148
+ target?: string | string[];
149
+ supported?: Record<string, boolean>;
150
+ platform?: esbuild.Platform;
151
+ mangleProps?: RegExp;
152
+ reserveProps?: RegExp;
153
+ mangleQuoted?: boolean;
154
+ mangleCache?: Record<string, string | false>;
155
+ drop?: esbuild.Drop[];
156
+ dropLabels?: string[];
157
+ minify?: boolean;
158
+ minifyWhitespace?: boolean;
159
+ minifyIdentifiers?: boolean;
160
+ minifySyntax?: boolean;
161
+ lineLimit?: number;
162
+ charset?: esbuild.Charset;
163
+ treeShaking?: boolean;
164
+ ignoreAnnotations?: boolean;
165
+ jsx?: "transform" | "preserve" | "automatic";
166
+ jsxFactory?: string;
167
+ jsxFragment?: string;
168
+ jsxImportSource?: string;
169
+ jsxDev?: boolean;
170
+ jsxSideEffects?: boolean;
171
+ define?: {
172
+ [key: string]: string;
173
+ };
174
+ pure?: string[];
175
+ keepNames?: boolean;
176
+ absPaths?: esbuild.AbsPaths[];
177
+ color?: boolean;
178
+ logLevel?: esbuild.LogLevel;
179
+ logLimit?: number;
180
+ logOverride?: Record<string, esbuild.LogLevel>;
181
+ tsconfigRaw?: string | esbuild.TsconfigRaw;
182
+ }>>;
183
+ cancel: () => Promise<void>;
184
+ }>;
185
+ input: (input: string | string[]) => Promise<{
186
+ output: (outputConfig: any) => Promise<BuildResult<BuildOptions>>;
187
+ }>;
188
+ build: (options: BuildOptions) => Promise<BuildResult<{
189
+ bundle?: boolean;
190
+ splitting?: boolean;
191
+ preserveSymlinks?: boolean;
192
+ outfile?: string;
193
+ metafile?: boolean;
194
+ outdir?: string;
195
+ outbase?: string;
196
+ external?: string[];
197
+ packages?: "bundle" | "external";
198
+ alias?: Record<string, string>;
199
+ loader?: {
200
+ [ext: string]: esbuild.Loader;
201
+ };
202
+ resolveExtensions?: string[];
203
+ mainFields?: string[];
204
+ conditions?: string[];
205
+ write?: boolean;
206
+ allowOverwrite?: boolean;
207
+ tsconfig?: string;
208
+ outExtension?: {
209
+ [ext: string]: string;
210
+ };
211
+ publicPath?: string;
212
+ entryNames?: string;
213
+ chunkNames?: string;
214
+ assetNames?: string;
215
+ inject?: string[];
216
+ banner?: {
217
+ [type: string]: string;
218
+ };
219
+ footer?: {
220
+ [type: string]: string;
221
+ };
222
+ entryPoints?: (string | {
223
+ in: string;
224
+ out: string;
225
+ })[] | Record<string, string>;
226
+ stdin?: esbuild.StdinOptions;
227
+ plugins?: esbuild.Plugin[];
228
+ absWorkingDir?: string;
229
+ nodePaths?: string[];
230
+ sourcemap?: boolean | "linked" | "inline" | "external" | "both";
231
+ legalComments?: "none" | "inline" | "eof" | "linked" | "external";
232
+ sourceRoot?: string;
233
+ sourcesContent?: boolean;
234
+ format?: esbuild.Format;
235
+ globalName?: string;
236
+ target?: string | string[];
237
+ supported?: Record<string, boolean>;
238
+ platform?: esbuild.Platform;
239
+ mangleProps?: RegExp;
240
+ reserveProps?: RegExp;
241
+ mangleQuoted?: boolean;
242
+ mangleCache?: Record<string, string | false>;
243
+ drop?: esbuild.Drop[];
244
+ dropLabels?: string[];
245
+ minify?: boolean;
246
+ minifyWhitespace?: boolean;
247
+ minifyIdentifiers?: boolean;
248
+ minifySyntax?: boolean;
249
+ lineLimit?: number;
250
+ charset?: esbuild.Charset;
251
+ treeShaking?: boolean;
252
+ ignoreAnnotations?: boolean;
253
+ jsx?: "transform" | "preserve" | "automatic";
254
+ jsxFactory?: string;
255
+ jsxFragment?: string;
256
+ jsxImportSource?: string;
257
+ jsxDev?: boolean;
258
+ jsxSideEffects?: boolean;
259
+ define?: {
260
+ [key: string]: string;
261
+ };
262
+ pure?: string[];
263
+ keepNames?: boolean;
264
+ absPaths?: esbuild.AbsPaths[];
265
+ color?: boolean;
266
+ logLevel?: esbuild.LogLevel;
267
+ logLimit?: number;
268
+ logOverride?: Record<string, esbuild.LogLevel>;
269
+ tsconfigRaw?: string | esbuild.TsconfigRaw;
270
+ }>>;
271
+ watch: (options: WatchOptions) => Promise<void>;
272
+ server: (serverConfig: ServeOptions) => Promise<ServeResult>;
306
273
  }
307
274
  declare const createCompiler: (baseConfig: any) => Compiler;
308
275
 
309
- declare const getDefine: (params: { NODE_ENV: string }) => {
310
- 'process.env.NODE_ENV': string;
276
+ declare const getDefine: (params: {
277
+ NODE_ENV: string;
278
+ }) => {
279
+ 'process.env.NODE_ENV': string;
311
280
  };
312
281
 
313
282
  type TEnvParams = {
314
- action: 'build' | 'dev' | 'serve';
315
- workRootDir: string;
283
+ action: 'build' | 'dev' | 'serve';
284
+ workRootDir: string;
316
285
  };
317
286
 
318
287
  type TEntryPoints = BuildOptions['entryPoints'];
@@ -328,28 +297,25 @@ type TLoader = BuildOptions['loader'];
328
297
 
329
298
  declare const inputFileDirList: string[];
330
299
  declare const inputFileTypeList: string[];
331
- declare const getEntryPoints: (
332
- envParams: TEnvParams,
333
- input?: TEntryPoints
334
- ) => TEntryPoints;
300
+ declare const getEntryPoints: (envParams: TEnvParams, input?: TEntryPoints) => TEntryPoints;
335
301
 
336
302
  declare const getReactLoaderPreset: () => {
337
- '.js': 'jsx';
338
- '.ts': 'ts';
339
- '.tsx': 'tsx';
340
- '.css': 'css';
341
- '.png': 'file';
342
- '.svg': 'file';
343
- '.json': 'json';
303
+ '.js': "jsx";
304
+ '.ts': "ts";
305
+ '.tsx': "tsx";
306
+ '.css': "css";
307
+ '.png': "file";
308
+ '.svg': "file";
309
+ '.json': "json";
344
310
  };
345
311
  declare const getNodeLoaderPreset: () => {
346
- '.js': 'jsx';
347
- '.ts': 'ts';
312
+ '.js': "jsx";
313
+ '.ts': "ts";
348
314
  };
349
315
 
350
316
  declare const getEsbuildPluginHtml: (params: {
351
- cdnConfig?: TCdn;
352
- entry: string;
317
+ cdnConfig?: TCdn;
318
+ entry: string;
353
319
  }) => esbuild.Plugin;
354
320
 
355
321
  declare const getLessPlugin: () => esbuild.Plugin;
@@ -359,14 +325,14 @@ declare const getPostCssPlugin: () => any;
359
325
  declare const getSassPlugin: () => esbuild.Plugin;
360
326
 
361
327
  declare class Ctx {
362
- configCtx: ConfigCtx;
363
- esbuildConfig: BuildOptions;
364
- envParams: TEnvParams;
365
- constructor(configCtx: ConfigCtx);
366
- updateEnvParams(argv: Partial<TEnvParams>): void;
367
- updateEsbuildConfig(config: BuildOptions): void;
368
- getDoraConfig(): TDoraConfig;
369
- geTDoraConfigEsbuild(): {};
328
+ configCtx: ConfigCtx;
329
+ esbuildConfig: BuildOptions;
330
+ envParams: TEnvParams;
331
+ constructor(configCtx: ConfigCtx);
332
+ updateEnvParams(argv: Partial<TEnvParams>): void;
333
+ updateEsbuildConfig(config: BuildOptions): void;
334
+ getDoraConfig(): TDoraConfig;
335
+ geTDoraConfigEsbuild(): {};
370
336
  }
371
337
 
372
338
  declare const esbuildEntryPointsMw: () => TOnionFun<Ctx>;
@@ -382,153 +348,111 @@ declare const esbuildPlainMw: () => TOnionFun<Ctx>;
382
348
  declare const esbuildStylePluginMw: () => TOnionFun<Ctx>;
383
349
 
384
350
  declare const getNodeBuildConfigPreset: (options?: BuildOptions) => {
385
- bundle: boolean;
386
- splitting?: boolean;
387
- preserveSymlinks?: boolean;
388
- outfile?: string;
389
- metafile?: boolean;
390
- outdir?: string;
391
- outbase?: string;
392
- external?: string[];
393
- packages?: 'bundle' | 'external';
394
- alias?: Record<string, string>;
395
- loader: {
396
- [ext: string]: esbuild.Loader;
397
- };
398
- resolveExtensions?: string[];
399
- mainFields?: string[];
400
- conditions?: string[];
401
- write?: boolean;
402
- allowOverwrite?: boolean;
403
- tsconfig?: string;
404
- outExtension?: {
405
- [ext: string]: string;
406
- };
407
- publicPath?: string;
408
- entryNames?: string;
409
- chunkNames?: string;
410
- assetNames?: string;
411
- inject?: string[];
412
- banner?: {
413
- [type: string]: string;
414
- };
415
- footer?: {
416
- [type: string]: string;
417
- };
418
- entryPoints?:
419
- | (
420
- | string
421
- | {
422
- in: string;
423
- out: string;
424
- }
425
- )[]
426
- | Record<string, string>;
427
- stdin?: esbuild.StdinOptions;
428
- plugins: esbuild.Plugin[];
429
- absWorkingDir?: string;
430
- nodePaths?: string[];
431
- sourcemap: boolean | 'linked' | 'inline' | 'external' | 'both';
432
- legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
433
- sourceRoot?: string;
434
- sourcesContent?: boolean;
435
- format?: esbuild.Format;
436
- globalName?: string;
437
- target: string | string[];
438
- supported?: Record<string, boolean>;
439
- platform: esbuild.Platform;
440
- mangleProps?: RegExp;
441
- reserveProps?: RegExp;
442
- mangleQuoted?: boolean;
443
- mangleCache?: Record<string, string | false>;
444
- drop?: esbuild.Drop[];
445
- dropLabels?: string[];
446
- minify: boolean;
447
- minifyWhitespace?: boolean;
448
- minifyIdentifiers?: boolean;
449
- minifySyntax?: boolean;
450
- lineLimit?: number;
451
- charset?: esbuild.Charset;
452
- treeShaking?: boolean;
453
- ignoreAnnotations?: boolean;
454
- jsx?: 'transform' | 'preserve' | 'automatic';
455
- jsxFactory?: string;
456
- jsxFragment?: string;
457
- jsxImportSource?: string;
458
- jsxDev?: boolean;
459
- jsxSideEffects?: boolean;
460
- define: {
461
- [key: string]: string;
462
- };
463
- pure?: string[];
464
- keepNames?: boolean;
465
- absPaths?: esbuild.AbsPaths[];
466
- color?: boolean;
467
- logLevel?: esbuild.LogLevel;
468
- logLimit?: number;
469
- logOverride?: Record<string, esbuild.LogLevel>;
470
- tsconfigRaw?: string | esbuild.TsconfigRaw;
351
+ bundle: boolean;
352
+ splitting?: boolean;
353
+ preserveSymlinks?: boolean;
354
+ outfile?: string;
355
+ metafile?: boolean;
356
+ outdir?: string;
357
+ outbase?: string;
358
+ external?: string[];
359
+ packages?: "bundle" | "external";
360
+ alias?: Record<string, string>;
361
+ loader: {
362
+ [ext: string]: esbuild.Loader;
363
+ };
364
+ resolveExtensions?: string[];
365
+ mainFields?: string[];
366
+ conditions?: string[];
367
+ write?: boolean;
368
+ allowOverwrite?: boolean;
369
+ tsconfig?: string;
370
+ outExtension?: {
371
+ [ext: string]: string;
372
+ };
373
+ publicPath?: string;
374
+ entryNames?: string;
375
+ chunkNames?: string;
376
+ assetNames?: string;
377
+ inject?: string[];
378
+ banner?: {
379
+ [type: string]: string;
380
+ };
381
+ footer?: {
382
+ [type: string]: string;
383
+ };
384
+ entryPoints?: (string | {
385
+ in: string;
386
+ out: string;
387
+ })[] | Record<string, string>;
388
+ stdin?: esbuild.StdinOptions;
389
+ plugins: esbuild.Plugin[];
390
+ absWorkingDir?: string;
391
+ nodePaths?: string[];
392
+ sourcemap: boolean | "linked" | "inline" | "external" | "both";
393
+ legalComments?: "none" | "inline" | "eof" | "linked" | "external";
394
+ sourceRoot?: string;
395
+ sourcesContent?: boolean;
396
+ format?: esbuild.Format;
397
+ globalName?: string;
398
+ target: string | string[];
399
+ supported?: Record<string, boolean>;
400
+ platform: esbuild.Platform;
401
+ mangleProps?: RegExp;
402
+ reserveProps?: RegExp;
403
+ mangleQuoted?: boolean;
404
+ mangleCache?: Record<string, string | false>;
405
+ drop?: esbuild.Drop[];
406
+ dropLabels?: string[];
407
+ minify: boolean;
408
+ minifyWhitespace?: boolean;
409
+ minifyIdentifiers?: boolean;
410
+ minifySyntax?: boolean;
411
+ lineLimit?: number;
412
+ charset?: esbuild.Charset;
413
+ treeShaking?: boolean;
414
+ ignoreAnnotations?: boolean;
415
+ jsx?: "transform" | "preserve" | "automatic";
416
+ jsxFactory?: string;
417
+ jsxFragment?: string;
418
+ jsxImportSource?: string;
419
+ jsxDev?: boolean;
420
+ jsxSideEffects?: boolean;
421
+ define: {
422
+ [key: string]: string;
423
+ };
424
+ pure?: string[];
425
+ keepNames?: boolean;
426
+ absPaths?: esbuild.AbsPaths[];
427
+ color?: boolean;
428
+ logLevel?: esbuild.LogLevel;
429
+ logLimit?: number;
430
+ logOverride?: Record<string, esbuild.LogLevel>;
431
+ tsconfigRaw?: string | esbuild.TsconfigRaw;
471
432
  };
472
433
 
473
434
  declare const getReactBuildConfigPreset: () => {
474
- entryPoints: string[];
475
- outdir: string;
476
- bundle: boolean;
477
- minify: boolean;
478
- sourcemap: boolean;
479
- target: string[];
480
- platform: string;
481
- external: string[];
482
- define: {
483
- 'process.env.NODE_ENV': string;
484
- };
485
- loader: {
486
- '.png': string;
487
- '.svg': string;
488
- };
489
- plugins: never[];
435
+ entryPoints: string[];
436
+ outdir: string;
437
+ bundle: boolean;
438
+ minify: boolean;
439
+ sourcemap: boolean;
440
+ target: string[];
441
+ platform: string;
442
+ external: string[];
443
+ define: {
444
+ 'process.env.NODE_ENV': string;
445
+ };
446
+ loader: {
447
+ '.png': string;
448
+ '.svg': string;
449
+ };
450
+ plugins: never[];
490
451
  };
491
452
 
492
453
  declare const createContext: () => Promise<esbuild.BuildContext<{}>>;
493
454
 
494
455
  declare const extractEntry: (entryPoints: TEntryPoints) => string[];
495
456
 
496
- export {
497
- builder,
498
- Compiler,
499
- createCompiler,
500
- createContext,
501
- Ctx,
502
- envParamsMw,
503
- esbuildEntryPointsMw,
504
- esbuildOutputMw,
505
- esbuildPlainMw,
506
- esbuildReactLoaderMw,
507
- esbuildStylePluginMw,
508
- extractEntry,
509
- getDefine,
510
- getEntryPoints,
511
- getEsbuildPluginHtml,
512
- getLessPlugin,
513
- getNodeBuildConfigPreset,
514
- getNodeLoaderPreset,
515
- getPostCssPlugin,
516
- getReactBuildConfigPreset,
517
- getReactLoaderPreset,
518
- getSassPlugin,
519
- inputFileDirList,
520
- inputFileTypeList,
521
- };
522
- export type {
523
- TBundle,
524
- TDefine,
525
- TEntryPoints,
526
- TEnvParams,
527
- TLoader,
528
- TMinify,
529
- TOutdir,
530
- TOutfile,
531
- TPlugins,
532
- TSourcemap,
533
- TTarget,
534
- };
457
+ export { Compiler, Ctx, builder, createCompiler, createContext, envParamsMw, esbuildEntryPointsMw, esbuildOutputMw, esbuildPlainMw, esbuildReactLoaderMw, esbuildStylePluginMw, extractEntry, getDefine, getEntryPoints, getEsbuildPluginHtml, getLessPlugin, getNodeBuildConfigPreset, getNodeLoaderPreset, getPostCssPlugin, getReactBuildConfigPreset, getReactLoaderPreset, getSassPlugin, inputFileDirList, inputFileTypeList };
458
+ export type { TBundle, TDefine, TEntryPoints, TEnvParams, TLoader, TMinify, TOutdir, TOutfile, TPlugins, TSourcemap, TTarget };