@hypernym/bundler 0.14.4 → 0.21.0
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/LICENSE.txt +2 -1
- package/README.md +155 -120
- package/dist/bin/index.mjs +178 -479
- package/dist/build/index.mjs +254 -0
- package/dist/index.d.mts +627 -658
- package/dist/index.mjs +50 -17
- package/dist/plugins/index.d.mts +14 -0
- package/dist/plugins/index.mjs +37 -0
- package/package.json +25 -30
- package/dist/index.cjs +0 -26
- package/dist/index.d.cts +0 -709
package/dist/index.d.mts
CHANGED
|
@@ -1,647 +1,642 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { RollupJsonOptions } from '@rollup/plugin-json';
|
|
4
|
-
import { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve';
|
|
5
|
-
import { RollupAliasOptions, Alias } from '@rollup/plugin-alias';
|
|
6
|
-
import { TransformOptions } from 'esbuild';
|
|
7
|
-
import { Options as Options$1 } from 'rollup-plugin-dts';
|
|
1
|
+
import { InputOptions, LogLevel, LogOrStringHandler, OutputOptions, RolldownPluginOption, RollupLog } from "rolldown";
|
|
2
|
+
import { Options as Options$1 } from "rolldown-plugin-dts";
|
|
8
3
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
//#region src/bin/build.d.ts
|
|
5
|
+
declare function build(options: Options): Promise<BuildStats>;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/types/build.d.ts
|
|
8
|
+
interface BuildLogs {
|
|
9
|
+
level: LogLevel;
|
|
10
|
+
log: RollupLog;
|
|
15
11
|
}
|
|
16
|
-
interface
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
interface BuildEntryStats {
|
|
13
|
+
/**
|
|
14
|
+
* The root path of the project.
|
|
15
|
+
*/
|
|
16
|
+
cwd: string;
|
|
17
|
+
/**
|
|
18
|
+
* Module output path.
|
|
19
|
+
*/
|
|
20
|
+
path: string;
|
|
21
|
+
/**
|
|
22
|
+
* Module size.
|
|
23
|
+
*/
|
|
24
|
+
size: number;
|
|
25
|
+
/**
|
|
26
|
+
* Build time of individual module.
|
|
27
|
+
*/
|
|
28
|
+
buildTime: number;
|
|
29
|
+
/**
|
|
30
|
+
* Module format.
|
|
31
|
+
*/
|
|
32
|
+
format: string;
|
|
33
|
+
/**
|
|
34
|
+
* List of warnings from build plugins.
|
|
35
|
+
*/
|
|
36
|
+
logs: BuildLogs[];
|
|
19
37
|
}
|
|
20
|
-
|
|
38
|
+
interface BuildStats {
|
|
39
|
+
/**
|
|
40
|
+
* The root path of the project.
|
|
41
|
+
*/
|
|
42
|
+
cwd: string;
|
|
43
|
+
/**
|
|
44
|
+
* Final bundle size.
|
|
45
|
+
*/
|
|
46
|
+
size: number;
|
|
47
|
+
/**
|
|
48
|
+
* Total bundle build time.
|
|
49
|
+
*/
|
|
50
|
+
buildTime: number;
|
|
51
|
+
/**
|
|
52
|
+
* List of generated bundle modules.
|
|
53
|
+
*/
|
|
54
|
+
files: BuildEntryStats[];
|
|
55
|
+
}
|
|
56
|
+
type PickEntryChunkOptions = 'input' | 'name' | 'globals' | 'extend' | 'minify';
|
|
57
|
+
type PickEntryDtsOptions = 'dts' | 'dtsPlugin';
|
|
58
|
+
interface BuildEntryOptions extends EntryBase, Partial<Pick<EntryChunk, PickEntryChunkOptions>>, Partial<Pick<EntryDts, PickEntryDtsOptions>> {
|
|
59
|
+
/**
|
|
60
|
+
* Specifies the path to the processed file.
|
|
61
|
+
*
|
|
62
|
+
* @default undefined
|
|
63
|
+
*/
|
|
64
|
+
output?: string;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/types/entries.d.ts
|
|
21
68
|
interface EntryBase {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Specifies the format of the generated module.
|
|
71
|
+
*
|
|
72
|
+
* - `'es'`, `'esm'` and `'module'` are the same format, all stand for ES module.
|
|
73
|
+
* - `'cjs'` and `'commonjs'` are the same format, all stand for CommonJS module.
|
|
74
|
+
* - `'iife'` stands for [Immediately Invoked Function Expression](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
|
|
75
|
+
* - `'umd'` stands for [Universal Module Definition](https://github.com/umdjs/umd).
|
|
76
|
+
*
|
|
77
|
+
* @default 'esm'
|
|
78
|
+
*/
|
|
79
|
+
format?: OutputOptions['format'];
|
|
80
|
+
/**
|
|
81
|
+
* Specifies the module IDs or regular expressions that match module IDs to be treated as external and excluded from the bundle.
|
|
82
|
+
*
|
|
83
|
+
* The IDs and regular expressions provided in this option are applied globally across all entries.
|
|
84
|
+
*
|
|
85
|
+
* Alternatively, externals can be defined individually for each entry using the `entry.externals` property.
|
|
86
|
+
*
|
|
87
|
+
* @default undefined
|
|
88
|
+
*/
|
|
89
|
+
externals?: (string | RegExp)[];
|
|
90
|
+
/**
|
|
91
|
+
* Maps external module IDs to paths.
|
|
92
|
+
*
|
|
93
|
+
* @default undefined
|
|
94
|
+
*/
|
|
95
|
+
paths?: {
|
|
96
|
+
find: string | RegExp;
|
|
97
|
+
replacement: string | ((path: string, match: RegExpExecArray | null) => string);
|
|
98
|
+
}[];
|
|
99
|
+
/**
|
|
100
|
+
* Specifies the string to be inserted at the beginning of the module.
|
|
101
|
+
*
|
|
102
|
+
* @default undefined
|
|
103
|
+
*/
|
|
104
|
+
banner?: OutputOptions['banner'];
|
|
105
|
+
/**
|
|
106
|
+
* Specifies the string to be inserted at the end of the module.
|
|
107
|
+
*
|
|
108
|
+
* @default undefined
|
|
109
|
+
*/
|
|
110
|
+
footer?: OutputOptions['footer'];
|
|
111
|
+
/**
|
|
112
|
+
* Specifies the code at the beginning that goes inside any _format-specific_ wrapper.
|
|
113
|
+
*
|
|
114
|
+
* @default undefined
|
|
115
|
+
*/
|
|
116
|
+
intro?: OutputOptions['intro'];
|
|
117
|
+
/**
|
|
118
|
+
* Specifies the code at the end that goes inside any _format-specific_ wrapper.
|
|
119
|
+
*
|
|
120
|
+
* @default undefined
|
|
121
|
+
*/
|
|
122
|
+
outro?: OutputOptions['outro'];
|
|
123
|
+
/**
|
|
124
|
+
* Intercepts log messages. If not supplied, logs are printed to the console.
|
|
125
|
+
*
|
|
126
|
+
* @default undefined
|
|
127
|
+
*/
|
|
128
|
+
onLog?: (level: LogLevel, log: RollupLog, defaultHandler: LogOrStringHandler, buildLogs: BuildLogs[]) => void;
|
|
129
|
+
/**
|
|
130
|
+
* Specifies Rolldown `resolve` options.
|
|
131
|
+
*
|
|
132
|
+
* @default undefined
|
|
133
|
+
*/
|
|
134
|
+
resolve?: InputOptions['resolve'];
|
|
135
|
+
/**
|
|
136
|
+
* Specifies Rolldown `define` options.
|
|
137
|
+
*
|
|
138
|
+
* @default undefined
|
|
139
|
+
*/
|
|
140
|
+
define?: InputOptions['define'];
|
|
141
|
+
/**
|
|
142
|
+
* Specifies Rolldown `inject` options.
|
|
143
|
+
*
|
|
144
|
+
* @default undefined
|
|
145
|
+
*/
|
|
146
|
+
inject?: InputOptions['inject'];
|
|
147
|
+
/**
|
|
148
|
+
* Specifies Rolldown plugins.
|
|
149
|
+
*
|
|
150
|
+
* @default undefined
|
|
151
|
+
*/
|
|
152
|
+
plugins?: RolldownPluginOption;
|
|
153
|
+
/**
|
|
154
|
+
* Specifies the path to the `tsconfig` file.
|
|
155
|
+
*
|
|
156
|
+
* By default, if the file `tsconfig.json` exists in the project root, it will be used as the default config file.
|
|
157
|
+
*
|
|
158
|
+
* @default undefined
|
|
159
|
+
*/
|
|
160
|
+
tsconfig?: InputOptions['tsconfig'];
|
|
81
161
|
}
|
|
82
162
|
interface EntryChunk extends EntryBase {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
* @default undefined
|
|
156
|
-
*/
|
|
157
|
-
minify?: boolean;
|
|
158
|
-
declaration?: never;
|
|
159
|
-
dts?: never;
|
|
160
|
-
copy?: never;
|
|
161
|
-
template?: never;
|
|
162
|
-
}
|
|
163
|
-
interface EntryDeclaration extends EntryBase {
|
|
164
|
-
/**
|
|
165
|
-
* Specifies the path of the TypeScript `declaration` build source.
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
*
|
|
169
|
-
* ```ts
|
|
170
|
-
* export default defineConfig({
|
|
171
|
-
* entries: [
|
|
172
|
-
* { dts: './src/types.ts' }, // => './dist/types.d.mts'
|
|
173
|
-
* ]
|
|
174
|
-
* })
|
|
175
|
-
* ```
|
|
176
|
-
*/
|
|
177
|
-
dts?: string;
|
|
178
|
-
/**
|
|
179
|
-
* Specifies the path of the TypeScript `declaration` build source.
|
|
180
|
-
*
|
|
181
|
-
* Also, it is possible to use `dts` alias.
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
*
|
|
185
|
-
* ```ts
|
|
186
|
-
* export default defineConfig({
|
|
187
|
-
* entries: [
|
|
188
|
-
* { declaration: './src/types.ts' }, // => './dist/types.d.mts'
|
|
189
|
-
* ]
|
|
190
|
-
* })
|
|
191
|
-
* ```
|
|
192
|
-
*/
|
|
193
|
-
declaration?: string;
|
|
194
|
-
/**
|
|
195
|
-
* Specifies the path of the TypeScript transformed `declaration` file.
|
|
196
|
-
*
|
|
197
|
-
* @example
|
|
198
|
-
*
|
|
199
|
-
* ```ts
|
|
200
|
-
* export default defineConfig({
|
|
201
|
-
* entries: [
|
|
202
|
-
* {
|
|
203
|
-
* dts: './src/types.ts',
|
|
204
|
-
* output: './out/types.d.ts', // => './out/types.d.ts'
|
|
205
|
-
* },
|
|
206
|
-
* ]
|
|
207
|
-
* })
|
|
208
|
-
* ```
|
|
209
|
-
*
|
|
210
|
-
* @default undefined
|
|
211
|
-
*/
|
|
212
|
-
output?: string;
|
|
213
|
-
/**
|
|
214
|
-
* Specifies the built-in `transformers` options.
|
|
215
|
-
*
|
|
216
|
-
* Available transformers:
|
|
217
|
-
*
|
|
218
|
-
* - `dts`
|
|
219
|
-
* - `alias`
|
|
220
|
-
*
|
|
221
|
-
* @default undefined
|
|
222
|
-
*/
|
|
223
|
-
transformers?: TransformersDeclaration;
|
|
224
|
-
input?: never;
|
|
225
|
-
copy?: never;
|
|
226
|
-
template?: never;
|
|
227
|
-
name?: never;
|
|
228
|
-
globals?: never;
|
|
229
|
-
extend?: never;
|
|
230
|
-
minify?: never;
|
|
163
|
+
/**
|
|
164
|
+
* Specifies the path to the build source.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
*
|
|
168
|
+
* ```ts
|
|
169
|
+
* export default defineConfig({
|
|
170
|
+
* entries: [
|
|
171
|
+
* { input: './src/index.ts' }, // outputs './dist/index.mjs'
|
|
172
|
+
* ]
|
|
173
|
+
* })
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
input: string;
|
|
177
|
+
/**
|
|
178
|
+
* Specifies the path to the processed file.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
*
|
|
182
|
+
* ```ts
|
|
183
|
+
* export default defineConfig({
|
|
184
|
+
* entries: [
|
|
185
|
+
* {
|
|
186
|
+
* input: './src/index.ts',
|
|
187
|
+
* output: './out/index.js', // outputs './out/index.js'
|
|
188
|
+
* },
|
|
189
|
+
* ]
|
|
190
|
+
* })
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* @default undefined
|
|
194
|
+
*/
|
|
195
|
+
output?: string;
|
|
196
|
+
/**
|
|
197
|
+
* Specifies the global variable name that representing exported bundle.
|
|
198
|
+
*
|
|
199
|
+
* Intended for `umd/iife` formats.
|
|
200
|
+
*
|
|
201
|
+
* @default undefined
|
|
202
|
+
*/
|
|
203
|
+
name?: OutputOptions['name'];
|
|
204
|
+
/**
|
|
205
|
+
* Specifies global _module ID_ and _variable name_ pairs necessary for external imports.
|
|
206
|
+
*
|
|
207
|
+
* Intended for `umd/iife` formats.
|
|
208
|
+
*
|
|
209
|
+
* @default undefined
|
|
210
|
+
*/
|
|
211
|
+
globals?: OutputOptions['globals'];
|
|
212
|
+
/**
|
|
213
|
+
* Specifies whether to extend the global variable defined by the `name` option.
|
|
214
|
+
*
|
|
215
|
+
* Intended for `umd/iife` formats.
|
|
216
|
+
*/
|
|
217
|
+
extend?: OutputOptions['extend'];
|
|
218
|
+
/**
|
|
219
|
+
* Controls code minification.
|
|
220
|
+
*
|
|
221
|
+
* - `true`: Enable full minification including code compression and dead code elimination.
|
|
222
|
+
* - `false`: Disable minification (default).
|
|
223
|
+
* - `'dce-only'`: Only perform dead code elimination without code compression.
|
|
224
|
+
* - `MinifyOptions`: Fine-grained control over minification settings.
|
|
225
|
+
*
|
|
226
|
+
* @default undefined
|
|
227
|
+
*/
|
|
228
|
+
minify?: OutputOptions['minify'];
|
|
229
|
+
dts?: never;
|
|
230
|
+
dtsPlugin?: never;
|
|
231
|
+
copy?: never;
|
|
232
|
+
recursive?: never;
|
|
233
|
+
filter?: never;
|
|
234
|
+
template?: never;
|
|
231
235
|
}
|
|
232
|
-
interface
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
236
|
+
interface EntryDts extends EntryBase {
|
|
237
|
+
/**
|
|
238
|
+
* Specifies the path to the TypeScript `declaration` build source.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
*
|
|
242
|
+
* ```ts
|
|
243
|
+
* export default defineConfig({
|
|
244
|
+
* entries: [
|
|
245
|
+
* { dts: './src/types.ts' }, // outputs './dist/types.d.mts'
|
|
246
|
+
* ]
|
|
247
|
+
* })
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
dts: string;
|
|
251
|
+
/**
|
|
252
|
+
* Specifies the path to the processed file.
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
*
|
|
256
|
+
* ```ts
|
|
257
|
+
* export default defineConfig({
|
|
258
|
+
* entries: [
|
|
259
|
+
* {
|
|
260
|
+
* dts: './src/types.ts',
|
|
261
|
+
* output: './out/types.d.ts', // outputs './out/types.d.ts'
|
|
262
|
+
* },
|
|
263
|
+
* ]
|
|
264
|
+
* })
|
|
265
|
+
* ```
|
|
266
|
+
*
|
|
267
|
+
* @default undefined
|
|
268
|
+
*/
|
|
269
|
+
output?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Specifies options for the `rolldown-plugin-dts` plugin.
|
|
272
|
+
*/
|
|
273
|
+
dtsPlugin?: Options$1;
|
|
274
|
+
input?: never;
|
|
275
|
+
name?: never;
|
|
276
|
+
globals?: never;
|
|
277
|
+
extend?: never;
|
|
278
|
+
minify?: never;
|
|
279
|
+
copy?: never;
|
|
280
|
+
recursive?: never;
|
|
281
|
+
filter?: never;
|
|
282
|
+
template?: never;
|
|
255
283
|
}
|
|
256
284
|
interface EntryCopy {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
/**
|
|
286
|
+
* Copies either a single `file` or an entire `directory` structure from the source to the destination, including all subdirectories and files.
|
|
287
|
+
*
|
|
288
|
+
* This is especially useful for transferring assets that don't require any transformation, just a straightforward copy-paste operation.
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
*
|
|
292
|
+
* ```ts
|
|
293
|
+
* export default defineConfig({
|
|
294
|
+
* entries: [
|
|
295
|
+
* {
|
|
296
|
+
* // copies a single file
|
|
297
|
+
* copy: './src/path/file.ts', // outputs './dist/path/file.ts'
|
|
298
|
+
* },
|
|
299
|
+
* {
|
|
300
|
+
* // copies a single file
|
|
301
|
+
* copy: './src/path/file.ts',
|
|
302
|
+
* output: './dist/subdir/custom-file-name.ts',
|
|
303
|
+
* },
|
|
304
|
+
* {
|
|
305
|
+
* // copies the entire directory
|
|
306
|
+
* input: './src/path/srcdir',
|
|
307
|
+
* output: './dist/outdir',
|
|
308
|
+
* },
|
|
309
|
+
* ]
|
|
310
|
+
* })
|
|
311
|
+
* ```
|
|
312
|
+
*
|
|
313
|
+
* @default undefined
|
|
314
|
+
*/
|
|
315
|
+
copy: string;
|
|
316
|
+
/**
|
|
317
|
+
* Specifies the path to the destination file or directory.
|
|
318
|
+
*/
|
|
319
|
+
output?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Copy directories recursively.
|
|
322
|
+
*
|
|
323
|
+
* @default true
|
|
324
|
+
*/
|
|
325
|
+
recursive?: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Filters copied `files/directories`.
|
|
328
|
+
*
|
|
329
|
+
* Returns `true` to copy the item, `false` to ignore it.
|
|
330
|
+
*
|
|
331
|
+
* @default undefined
|
|
332
|
+
*/
|
|
333
|
+
filter?(source: string, destination: string): boolean;
|
|
334
|
+
input?: never;
|
|
335
|
+
name?: never;
|
|
336
|
+
globals?: never;
|
|
337
|
+
extend?: never;
|
|
338
|
+
minify?: never;
|
|
339
|
+
dts?: never;
|
|
340
|
+
dtsPlugin?: never;
|
|
341
|
+
template?: never;
|
|
288
342
|
}
|
|
289
343
|
interface EntryTemplate {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Specifies the content of the `template` file.
|
|
346
|
+
*
|
|
347
|
+
* Provides the ability to dynamically inject template content during the build phase.
|
|
348
|
+
*
|
|
349
|
+
* @example
|
|
350
|
+
*
|
|
351
|
+
* ```ts
|
|
352
|
+
* import { name, version } from './package.json'
|
|
353
|
+
*
|
|
354
|
+
* export default defineConfig({
|
|
355
|
+
* entries: [
|
|
356
|
+
* {
|
|
357
|
+
* template: `// Package ${name} v${version} ...`,
|
|
358
|
+
* output: './dist/template.ts',
|
|
359
|
+
* },
|
|
360
|
+
* ]
|
|
361
|
+
* })
|
|
362
|
+
* ```
|
|
363
|
+
*/
|
|
364
|
+
template: string;
|
|
365
|
+
/**
|
|
366
|
+
* Specifies the path to the destination file.
|
|
367
|
+
*/
|
|
368
|
+
output: string;
|
|
369
|
+
input?: never;
|
|
370
|
+
name?: never;
|
|
371
|
+
globals?: never;
|
|
372
|
+
extend?: never;
|
|
373
|
+
minify?: never;
|
|
374
|
+
dts?: never;
|
|
375
|
+
dtsPlugin?: never;
|
|
376
|
+
copy?: never;
|
|
377
|
+
recursive?: never;
|
|
378
|
+
filter?: never;
|
|
321
379
|
}
|
|
322
|
-
type EntryOptions = EntryChunk |
|
|
323
|
-
|
|
380
|
+
type EntryOptions = EntryChunk | EntryDts | EntryCopy | EntryTemplate;
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/types/options.d.ts
|
|
324
383
|
interface Options {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
384
|
+
/**
|
|
385
|
+
* Specifies the bundle's entry points.
|
|
386
|
+
*
|
|
387
|
+
* It allows you to manually set all build entries and adjust options for each one individually.
|
|
388
|
+
*
|
|
389
|
+
* @example
|
|
390
|
+
*
|
|
391
|
+
* ```ts
|
|
392
|
+
* export default defineConfig({
|
|
393
|
+
* entries: [
|
|
394
|
+
* { input: './src/index.ts' }, // outputs './dist/index.mjs'
|
|
395
|
+
* { dts: './src/types.ts' }, // outputs './dist/types.d.mts'
|
|
396
|
+
* // ...
|
|
397
|
+
* ]
|
|
398
|
+
* })
|
|
399
|
+
* ```
|
|
400
|
+
*/
|
|
401
|
+
entries: EntryOptions[];
|
|
402
|
+
/**
|
|
403
|
+
* Specifies the output directory for production bundle.
|
|
404
|
+
*
|
|
405
|
+
* @example
|
|
406
|
+
*
|
|
407
|
+
* ```ts
|
|
408
|
+
* export default defineConfig({
|
|
409
|
+
* outDir: './output',
|
|
410
|
+
* })
|
|
411
|
+
* ```
|
|
412
|
+
*
|
|
413
|
+
* @default 'dist'
|
|
414
|
+
*/
|
|
415
|
+
outDir?: string;
|
|
416
|
+
/**
|
|
417
|
+
* Specifies the module IDs, or regular expressions to match module IDs,
|
|
418
|
+
* that should remain external to the bundle.
|
|
419
|
+
*
|
|
420
|
+
* IDs and regexps from this option are applied globally to all entries.
|
|
421
|
+
*
|
|
422
|
+
* Also, it is possible to define externals individually per entry (`entry.externals`).
|
|
423
|
+
*
|
|
424
|
+
* @example
|
|
425
|
+
*
|
|
426
|
+
* ```ts
|
|
427
|
+
* export default defineConfig({
|
|
428
|
+
* externals: ['id-1', 'id-2', /regexp/],
|
|
429
|
+
* })
|
|
430
|
+
* ```
|
|
431
|
+
*
|
|
432
|
+
* @default [/^node:/,/^@types/,/^@rollup/,/^@rolldown/,/^@hypernym/,/^rollup/,/^rolldown/,...pkg.dependencies]
|
|
433
|
+
*/
|
|
434
|
+
externals?: (string | RegExp)[];
|
|
435
|
+
/**
|
|
436
|
+
* Provides a powerful hooking system to further expand bundling mode.
|
|
437
|
+
*
|
|
438
|
+
* @example
|
|
439
|
+
*
|
|
440
|
+
* ```ts
|
|
441
|
+
* export default defineConfig({
|
|
442
|
+
* hooks: {
|
|
443
|
+
* 'build:end': async (options, buildStats) => {
|
|
444
|
+
* // ...
|
|
445
|
+
* }
|
|
446
|
+
* }
|
|
447
|
+
* })
|
|
448
|
+
* ```
|
|
449
|
+
*
|
|
450
|
+
* @default undefined
|
|
451
|
+
*/
|
|
452
|
+
hooks?: HooksOptions;
|
|
453
|
+
/**
|
|
454
|
+
* Controls code minification for all `chunk` entries.
|
|
455
|
+
*
|
|
456
|
+
* - `true`: Enable full minification including code compression and dead code elimination.
|
|
457
|
+
* - `false`: Disable minification (default).
|
|
458
|
+
* - `'dce-only'`: Only perform dead code elimination without code compression.
|
|
459
|
+
* - `MinifyOptions`: Fine-grained control over minification settings.
|
|
460
|
+
*
|
|
461
|
+
* @example
|
|
462
|
+
*
|
|
463
|
+
* ```ts
|
|
464
|
+
* export default defineConfig({
|
|
465
|
+
* minify: true,
|
|
466
|
+
* })
|
|
467
|
+
* ```
|
|
468
|
+
*
|
|
469
|
+
* It can also be set per entry.
|
|
470
|
+
*
|
|
471
|
+
* ```ts
|
|
472
|
+
* export default defineConfig({
|
|
473
|
+
* entries: [
|
|
474
|
+
* {
|
|
475
|
+
* input: './src/index.ts',
|
|
476
|
+
* minify: true,
|
|
477
|
+
* },
|
|
478
|
+
* ],
|
|
479
|
+
* })
|
|
480
|
+
* ```
|
|
481
|
+
*
|
|
482
|
+
* @default undefined
|
|
483
|
+
*/
|
|
484
|
+
minify?: OutputOptions['minify'];
|
|
485
|
+
/**
|
|
486
|
+
* Specifies the path to the project root (current working directory).
|
|
487
|
+
*
|
|
488
|
+
* @example
|
|
489
|
+
*
|
|
490
|
+
* ```ts
|
|
491
|
+
* export default defineConfig({
|
|
492
|
+
* cwd: './dir',
|
|
493
|
+
* })
|
|
494
|
+
* ```
|
|
495
|
+
*
|
|
496
|
+
* @default undefined
|
|
497
|
+
*/
|
|
498
|
+
cwd?: string;
|
|
499
|
+
/**
|
|
500
|
+
* Specifies the path to the `tsconfig` file.
|
|
501
|
+
*
|
|
502
|
+
* By default, if the file `tsconfig.json` exists in the project root, it will be used as the default config file.
|
|
503
|
+
*
|
|
504
|
+
* @example
|
|
505
|
+
*
|
|
506
|
+
* ```ts
|
|
507
|
+
* export default defineConfig({
|
|
508
|
+
* tsconfig: './path/to/tsconfig.json',
|
|
509
|
+
* })
|
|
510
|
+
* ```
|
|
511
|
+
*
|
|
512
|
+
* @default undefined
|
|
513
|
+
*/
|
|
514
|
+
tsconfig?: string;
|
|
454
515
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
level: LogLevel;
|
|
458
|
-
log: RollupLog;
|
|
459
|
-
}
|
|
460
|
-
interface BuildEntryStats {
|
|
461
|
-
/**
|
|
462
|
-
* The root path of the project.
|
|
463
|
-
*/
|
|
464
|
-
cwd: string;
|
|
465
|
-
/**
|
|
466
|
-
* Module output path.
|
|
467
|
-
*/
|
|
468
|
-
path: string;
|
|
469
|
-
/**
|
|
470
|
-
* Module size.
|
|
471
|
-
*/
|
|
472
|
-
size: number;
|
|
473
|
-
/**
|
|
474
|
-
* Build time of individual module.
|
|
475
|
-
*/
|
|
476
|
-
buildTime: number;
|
|
477
|
-
/**
|
|
478
|
-
* Module format.
|
|
479
|
-
*/
|
|
480
|
-
format: string;
|
|
481
|
-
/**
|
|
482
|
-
* List of warnings from build plugins.
|
|
483
|
-
*/
|
|
484
|
-
logs: BuildLogs[];
|
|
485
|
-
}
|
|
486
|
-
interface BuildStats {
|
|
487
|
-
/**
|
|
488
|
-
* The root path of the project.
|
|
489
|
-
*/
|
|
490
|
-
cwd: string;
|
|
491
|
-
/**
|
|
492
|
-
* Final bundle size.
|
|
493
|
-
*/
|
|
494
|
-
size: number;
|
|
495
|
-
/**
|
|
496
|
-
* Total bundle build time.
|
|
497
|
-
*/
|
|
498
|
-
buildTime: number;
|
|
499
|
-
/**
|
|
500
|
-
* List of generated bundle modules.
|
|
501
|
-
*/
|
|
502
|
-
files: BuildEntryStats[];
|
|
503
|
-
}
|
|
504
|
-
type PickEntryChunkOptions = 'input' | 'name' | 'globals' | 'extend' | 'minify' | 'transformers';
|
|
505
|
-
type PickEntryDtsOptions = 'declaration' | 'dts' | 'transformers';
|
|
506
|
-
interface BuildEntryOptions extends EntryBase, Pick<EntryChunk, PickEntryChunkOptions>, Pick<EntryDeclaration, PickEntryDtsOptions> {
|
|
507
|
-
/**
|
|
508
|
-
* Specifies the path of the transformed file.
|
|
509
|
-
*
|
|
510
|
-
* @default undefined
|
|
511
|
-
*/
|
|
512
|
-
output?: string;
|
|
513
|
-
/**
|
|
514
|
-
* Specifies options for default plugins.
|
|
515
|
-
*
|
|
516
|
-
* @default undefined
|
|
517
|
-
*/
|
|
518
|
-
transformers?: TransformersChunk & TransformersDeclaration;
|
|
519
|
-
/**
|
|
520
|
-
* Specifies list of default plugins.
|
|
521
|
-
*/
|
|
522
|
-
defaultPlugins: Plugin[];
|
|
523
|
-
}
|
|
524
|
-
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region src/types/hooks.d.ts
|
|
525
518
|
interface HooksOptions {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
519
|
+
/**
|
|
520
|
+
* Called at the beginning of bundling.
|
|
521
|
+
*
|
|
522
|
+
* @example
|
|
523
|
+
*
|
|
524
|
+
* ```ts
|
|
525
|
+
* export default defineConfig({
|
|
526
|
+
* hooks: {
|
|
527
|
+
* 'bundle:start': async (options) => {
|
|
528
|
+
* // ...
|
|
529
|
+
* }
|
|
530
|
+
* }
|
|
531
|
+
* })
|
|
532
|
+
* ```
|
|
533
|
+
*
|
|
534
|
+
* @default undefined
|
|
535
|
+
*/
|
|
536
|
+
'bundle:start'?: (options: Options) => void | Promise<void>;
|
|
537
|
+
/**
|
|
538
|
+
* Called at the beginning of building.
|
|
539
|
+
*
|
|
540
|
+
* @example
|
|
541
|
+
*
|
|
542
|
+
* ```ts
|
|
543
|
+
* export default defineConfig({
|
|
544
|
+
* hooks: {
|
|
545
|
+
* 'build:start': async (options, stats) => {
|
|
546
|
+
* // ...
|
|
547
|
+
* }
|
|
548
|
+
* }
|
|
549
|
+
* })
|
|
550
|
+
* ```
|
|
551
|
+
*
|
|
552
|
+
* @default undefined
|
|
553
|
+
*/
|
|
554
|
+
'build:start'?: (options: Options, stats: BuildStats) => void | Promise<void>;
|
|
555
|
+
/**
|
|
556
|
+
* Called on each entry just before the build process.
|
|
557
|
+
*
|
|
558
|
+
* Provides the ability to customize entry options before they are passed to the next phase.
|
|
559
|
+
*
|
|
560
|
+
* @example
|
|
561
|
+
*
|
|
562
|
+
* ```ts
|
|
563
|
+
* export default defineConfig({
|
|
564
|
+
* hooks: {
|
|
565
|
+
* 'build:entry:start': async (entry, stats) => {
|
|
566
|
+
* // ...
|
|
567
|
+
* }
|
|
568
|
+
* }
|
|
569
|
+
* })
|
|
570
|
+
* ```
|
|
571
|
+
*
|
|
572
|
+
* @default undefined
|
|
573
|
+
*/
|
|
574
|
+
'build:entry:start'?: (entry: BuildEntryOptions, stats: BuildEntryStats) => void | Promise<void>;
|
|
575
|
+
/**
|
|
576
|
+
* Called on each entry right after the build process is completed.
|
|
577
|
+
*
|
|
578
|
+
* @example
|
|
579
|
+
*
|
|
580
|
+
* ```ts
|
|
581
|
+
* export default defineConfig({
|
|
582
|
+
* hooks: {
|
|
583
|
+
* 'build:entry:end': async (entry, stats) => {
|
|
584
|
+
* // ...
|
|
585
|
+
* }
|
|
586
|
+
* }
|
|
587
|
+
* })
|
|
588
|
+
* ```
|
|
589
|
+
*
|
|
590
|
+
* @default undefined
|
|
591
|
+
*/
|
|
592
|
+
'build:entry:end'?: (entry: BuildEntryOptions, stats: BuildEntryStats) => void | Promise<void>;
|
|
593
|
+
/**
|
|
594
|
+
* Called right after building is complete.
|
|
595
|
+
*
|
|
596
|
+
* @example
|
|
597
|
+
*
|
|
598
|
+
* ```ts
|
|
599
|
+
* export default defineConfig({
|
|
600
|
+
* hooks: {
|
|
601
|
+
* 'build:end': async (options, stats) => {
|
|
602
|
+
* // ...
|
|
603
|
+
* }
|
|
604
|
+
* }
|
|
605
|
+
* })
|
|
606
|
+
* ```
|
|
607
|
+
*
|
|
608
|
+
* @default undefined
|
|
609
|
+
*/
|
|
610
|
+
'build:end'?: (options: Options, stats: BuildStats) => void | Promise<void>;
|
|
611
|
+
/**
|
|
612
|
+
* Called right after bundling is complete.
|
|
613
|
+
*
|
|
614
|
+
* @example
|
|
615
|
+
*
|
|
616
|
+
* ```ts
|
|
617
|
+
* export default defineConfig({
|
|
618
|
+
* hooks: {
|
|
619
|
+
* 'bundle:end': async (options) => {
|
|
620
|
+
* // ...
|
|
621
|
+
* }
|
|
622
|
+
* }
|
|
623
|
+
* })
|
|
624
|
+
* ```
|
|
625
|
+
*
|
|
626
|
+
* @default undefined
|
|
627
|
+
*/
|
|
628
|
+
'bundle:end'?: (options: Options) => void | Promise<void>;
|
|
636
629
|
}
|
|
637
|
-
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region src/types/loader.d.ts
|
|
638
632
|
interface ConfigLoader {
|
|
639
|
-
|
|
640
|
-
|
|
633
|
+
options: Options;
|
|
634
|
+
path: string;
|
|
641
635
|
}
|
|
642
|
-
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region src/config.d.ts
|
|
643
638
|
/**
|
|
644
|
-
* List of global
|
|
639
|
+
* List of global default patterns for external module identifiers.
|
|
645
640
|
*
|
|
646
641
|
* @example
|
|
647
642
|
*
|
|
@@ -660,7 +655,9 @@ interface ConfigLoader {
|
|
|
660
655
|
*/
|
|
661
656
|
declare const externals: RegExp[];
|
|
662
657
|
/**
|
|
663
|
-
*
|
|
658
|
+
* ESM & TS module bundler.
|
|
659
|
+
*
|
|
660
|
+
* Automatically detects a custom configuration file at the project root, which can override or extend the build behavior.
|
|
664
661
|
*
|
|
665
662
|
* Configuration file also accepts `.js`, `.mjs`, `.ts`, `.mts` formats.
|
|
666
663
|
*
|
|
@@ -673,37 +670,9 @@ declare const externals: RegExp[];
|
|
|
673
670
|
* // ...
|
|
674
671
|
* })
|
|
675
672
|
* ```
|
|
676
|
-
*/
|
|
677
|
-
declare function defineConfig(options: Options): Options;
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* Resolves external module IDs into custom paths.
|
|
681
|
-
*
|
|
682
|
-
* @example
|
|
683
673
|
*
|
|
684
|
-
*
|
|
685
|
-
* import { defineConfig, resolvePaths } from '@hypernym/bundler'
|
|
686
|
-
*
|
|
687
|
-
* export default defineConfig({
|
|
688
|
-
* entries: [
|
|
689
|
-
* {
|
|
690
|
-
* input: './src/index.ts',
|
|
691
|
-
* externals: [/^@\/path/],
|
|
692
|
-
* paths: resolvePaths([
|
|
693
|
-
* // replaces `@/path` with `./path/index.mjs`
|
|
694
|
-
* { find: /^@\/path/, replacement: './path/index.mjs', }
|
|
695
|
-
* ]),
|
|
696
|
-
* },
|
|
697
|
-
* ]
|
|
698
|
-
* })
|
|
699
|
-
* ```
|
|
674
|
+
* @see [Repository](https://github.com/hypernym-studio/bundler)
|
|
700
675
|
*/
|
|
701
|
-
declare function
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
find: string | RegExp;
|
|
705
|
-
replacement: string;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
export { defineConfig, externals, resolvePaths };
|
|
709
|
-
export type { BuildLogs, BuildStats, ConfigLoader, CopyOptions, EntryBase, EntryChunk, EntryCopy, EntryDeclaration, EntryOptions, EntryTemplate, HooksOptions, Options, ResolvePathsOptions, TransformersChunk, TransformersDeclaration };
|
|
676
|
+
declare function defineConfig(options: Options): Options;
|
|
677
|
+
//#endregion
|
|
678
|
+
export { BuildEntryOptions, BuildEntryStats, BuildLogs, BuildStats, ConfigLoader, EntryBase, EntryChunk, EntryCopy, EntryDts, EntryOptions, EntryTemplate, HooksOptions, Options, build, defineConfig, externals };
|