@rolldown/browser 1.0.0-beta.43 → 1.0.0-beta.45
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/dist/cli-setup.d.mts +1 -0
- package/dist/cli-setup.mjs +16 -0
- package/dist/cli.mjs +1049 -76
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -4
- package/dist/experimental-index.browser.mjs +34 -453
- package/dist/experimental-index.d.mts +21 -6
- package/dist/experimental-index.mjs +39 -16
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +3 -3
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasi-browser.js +1 -2
- package/dist/rolldown-binding.wasi.cjs +1 -2
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-BkaKdpud.d.mts → binding-DRegrFdE.d.mts} +98 -22
- package/dist/shared/{dist-CU0dSkK2.mjs → composable-filters-D_PY7Qa7.mjs} +2 -2
- package/dist/shared/{define-config-D5LB7YAC.d.mts → define-config-C6-goOPh.d.mts} +217 -99
- package/dist/shared/{load-config-DBsf9ada.mjs → load-config-Z2MWPLZO.mjs} +4 -4
- package/dist/shared/{parse-ast-index-Gktxd-oi.mjs → parse-ast-index-Ck5SwMSC.mjs} +37 -6
- package/dist/shared/{prompt-B4e-jZUR.mjs → prompt-BDwA3jSr.mjs} +1 -1
- package/dist/shared/{src-Dqrw8WuH.mjs → src-B4ZmdjD5.mjs} +637 -669
- package/dist/{src-DXN0YLUN.js → src-CLWy1Uip.js} +871 -873
- package/package.json +1 -1
- package/dist/shared/logger-B83ocDok.mjs +0 -985
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { BuiltinPlugin,
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
3
|
-
import "./shared/
|
|
4
|
-
import { logger } from "./shared/logger-B83ocDok.mjs";
|
|
1
|
+
import { b as BuiltinPlugin, c as createBundlerOptions, f as normalizeBindingResult, l as normalizedStringOrRegex, m as bindingifySourcemap, p as transformToRollupOutput, s as RolldownBuild, x as makeBuiltinPluginCallable, y as PluginDriver } from "./shared/src-B4ZmdjD5.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
5
4
|
import { BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
6
5
|
import { pathToFileURL } from "node:url";
|
|
7
6
|
|
|
@@ -29,7 +28,12 @@ var DevEngine = class DevEngine {
|
|
|
29
28
|
const bindingDevOptions = {
|
|
30
29
|
onHmrUpdates: bindingOnHmrUpdates,
|
|
31
30
|
onOutput: userOnOutput ? function(rawResult) {
|
|
32
|
-
|
|
31
|
+
const result = normalizeBindingResult(rawResult);
|
|
32
|
+
if (result instanceof Error) {
|
|
33
|
+
userOnOutput(result);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
userOnOutput(transformToRollupOutput(result));
|
|
33
37
|
} : void 0,
|
|
34
38
|
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? BindingRebuildStrategy$1.Always : devOptions.rebuildStrategy === "auto" ? BindingRebuildStrategy$1.Auto : BindingRebuildStrategy$1.Never : void 0,
|
|
35
39
|
watch: devOptions.watch && {
|
|
@@ -80,7 +84,7 @@ var DevEngine = class DevEngine {
|
|
|
80
84
|
|
|
81
85
|
//#endregion
|
|
82
86
|
//#region src/api/dev/index.ts
|
|
83
|
-
|
|
87
|
+
const dev = (...args) => DevEngine.create(...args);
|
|
84
88
|
|
|
85
89
|
//#endregion
|
|
86
90
|
//#region src/api/experimental.ts
|
|
@@ -151,9 +155,6 @@ function viteResolvePlugin(config) {
|
|
|
151
155
|
function isolatedDeclarationPlugin(config) {
|
|
152
156
|
return new BuiltinPlugin("builtin:isolated-declaration", config);
|
|
153
157
|
}
|
|
154
|
-
function assetPlugin(config) {
|
|
155
|
-
return new BuiltinPlugin("builtin:asset", config);
|
|
156
|
-
}
|
|
157
158
|
function webWorkerPostPlugin() {
|
|
158
159
|
return new BuiltinPlugin("builtin:web-worker-post");
|
|
159
160
|
}
|
|
@@ -167,6 +168,12 @@ function reactRefreshWrapperPlugin(config) {
|
|
|
167
168
|
}
|
|
168
169
|
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:react-refresh-wrapper", config));
|
|
169
170
|
}
|
|
171
|
+
function viteCSSPostPlugin(config) {
|
|
172
|
+
return new BuiltinPlugin("builtin:vite-css-post", config);
|
|
173
|
+
}
|
|
174
|
+
function viteHtmlPlugin(config) {
|
|
175
|
+
return new BuiltinPlugin("builtin:vite-html", config);
|
|
176
|
+
}
|
|
170
177
|
|
|
171
178
|
//#endregion
|
|
172
179
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
@@ -174,6 +181,12 @@ function aliasPlugin(config) {
|
|
|
174
181
|
return new BuiltinPlugin("builtin:alias", config);
|
|
175
182
|
}
|
|
176
183
|
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region src/builtin-plugin/asset-plugin.ts
|
|
186
|
+
function assetPlugin(config) {
|
|
187
|
+
return new BuiltinPlugin("builtin:asset", config);
|
|
188
|
+
}
|
|
189
|
+
|
|
177
190
|
//#endregion
|
|
178
191
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
179
192
|
/**
|
|
@@ -199,15 +212,10 @@ function aliasPlugin(config) {
|
|
|
199
212
|
* ```
|
|
200
213
|
*/
|
|
201
214
|
function replacePlugin(values = {}, options = {}) {
|
|
202
|
-
let hasNonStringValues = false;
|
|
203
215
|
Object.keys(values).forEach((key) => {
|
|
204
216
|
const value = values[key];
|
|
205
|
-
if (typeof value !== "string")
|
|
206
|
-
hasNonStringValues = true;
|
|
207
|
-
values[key] = String(value);
|
|
208
|
-
}
|
|
217
|
+
if (typeof value !== "string") values[key] = String(value);
|
|
209
218
|
});
|
|
210
|
-
if (hasNonStringValues) logger.warn("Some values provided to `replacePlugin` are not strings. They will be converted to strings, but for better performance consider converting them manually.");
|
|
211
219
|
return new BuiltinPlugin("builtin:replace", {
|
|
212
220
|
...options,
|
|
213
221
|
values
|
|
@@ -228,4 +236,19 @@ function transformPlugin(config) {
|
|
|
228
236
|
}
|
|
229
237
|
|
|
230
238
|
//#endregion
|
|
231
|
-
|
|
239
|
+
//#region src/builtin-plugin/vite-css-plugin.ts
|
|
240
|
+
function viteCSSPlugin(config) {
|
|
241
|
+
return new BuiltinPlugin("builtin:vite-css", config ? {
|
|
242
|
+
...config,
|
|
243
|
+
async compileCSS(url, importer, resolver) {
|
|
244
|
+
let result = await config.compileCSS(url, importer, resolver);
|
|
245
|
+
return {
|
|
246
|
+
...result,
|
|
247
|
+
map: bindingifySourcemap(result.map)
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
} : void 0);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
//#endregion
|
|
254
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import
|
|
1
|
+
import { k as withFilter } from "./shared/define-config-C6-goOPh.mjs";
|
|
2
|
+
import "./shared/binding-DRegrFdE.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as include, c as or, d as arraify, f as isPromiseLike, i as id, l as queries, n as code, o as moduleType, r as exclude, s as not, t as and, u as query } from "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/with-filter.ts
|
|
4
4
|
function withFilterImpl(pluginOption, filterObjectList) {
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./src-CLWy1Uip.js";
|
|
2
2
|
|
|
3
3
|
export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $ as InternalModuleFormat, At as SourceMap, B as GetModuleInfo, C as ResolveIdResult, Ct as PartialNull, D as SourceDescription, Dt as RenderedChunk, E as RolldownPluginOption, Et as OutputChunk, F as OutputBundle, Ft as LogOrStringHandler, G as PluginContextMeta, H as DefineParallelPluginResult, I as TreeshakingOptions, It as RollupError, J as ModuleTypeFilter, K as GeneralHookFilter, L as TransformPluginContext, Lt as RollupLog, M as ExistingRawSourceMap, Mt as SourcemapIgnoreListOption, N as SourceMapInput, Nt as LogLevel, O as TransformResult, Ot as RenderedModule, P as RolldownOptionsFunction, Pt as LogLevelOption, Q as RolldownFsModule, R as EmittedAsset, Rt as RollupLogWithString, S as ResolveIdExtraOptions, T as RolldownPlugin, Tt as OutputAsset, V as PluginContext, W as MinimalPluginContext, X as RolldownDirectoryEntry, Y as BufferEncoding, Z as RolldownFileStats, _ as ModuleType, _t as GlobalsFunction, a as InputOption, at as RolldownWatcher, b as PartialResolvedId, bt as OutputOptions, c as OptimizationOptions, ct as rolldown, d as CustomPluginOptions, dt as build, et as NormalizedOutputOptions, f as FunctionPluginHooks, ft as AddonFunction, g as ModuleOptions, gt as GeneratedCodePreset, h as LoadResult, ht as GeneratedCodeOptions, i as ExternalOption, it as watch, j as VERSION, jt as ModuleInfo, kt as RolldownOutput, l as WatcherOptions, lt as RolldownBuild, m as ImportKind, mt as ChunkingContext, n as ConfigExport, nt as LoggingFunction, o as InputOptions, ot as RolldownWatcherEvent, p as HookFilterExtension, pt as ChunkFileNamesFunction, q as HookFilter, r as RolldownOptions, rt as WarningHandlerWithDefault, s as ModuleTypes, st as WatchOptions, t as defineConfig, tt as NormalizedInputOptions, u as AsyncPluginHooks, ut as BuildOptions, v as ObjectHook, vt as MinifyOptions, w as ResolvedId, x as Plugin, xt as PreRenderedAsset, y as ParallelPluginHooks, yt as ModuleFormat, z as EmittedFile } from "./shared/define-config-C6-goOPh.mjs";
|
|
2
|
+
import { I as PreRenderedChunk, f as BindingMagicString } from "./shared/binding-DRegrFdE.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
3
|
-
import "./shared/
|
|
1
|
+
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./shared/src-B4ZmdjD5.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
4
|
|
|
5
5
|
export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
3
|
-
import "./shared/
|
|
1
|
+
import { d as bindingifyPlugin, u as PluginContextData } from "./shared/src-B4ZmdjD5.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import
|
|
1
|
+
import { St as MaybePromise, x as Plugin } from "./shared/define-config-C6-goOPh.mjs";
|
|
2
|
+
import "./shared/binding-DRegrFdE.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as ParserOptions, P as ParseResult } from "./shared/binding-DRegrFdE.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
|
|
4
4
|
//#region src/parse-ast-index.d.ts
|
|
5
|
-
declare function parseAst(sourceText: string, options?: ParserOptions |
|
|
6
|
-
declare function parseAstAsync(sourceText: string, options?: ParserOptions |
|
|
5
|
+
declare function parseAst(sourceText: string, options?: ParserOptions | null, filename?: string): Program;
|
|
6
|
+
declare function parseAstAsync(sourceText: string, options?: ParserOptions | null, filename?: string): Promise<Program>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { type ParseResult, type ParserOptions, parseAst, parseAstAsync };
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -94,12 +94,12 @@ export const BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
|
94
94
|
export const BindingNormalizedOptions = __napiModule.exports.BindingNormalizedOptions
|
|
95
95
|
export const BindingOutputAsset = __napiModule.exports.BindingOutputAsset
|
|
96
96
|
export const BindingOutputChunk = __napiModule.exports.BindingOutputChunk
|
|
97
|
-
export const BindingOutputs = __napiModule.exports.BindingOutputs
|
|
98
97
|
export const BindingPluginContext = __napiModule.exports.BindingPluginContext
|
|
99
98
|
export const BindingRenderedChunk = __napiModule.exports.BindingRenderedChunk
|
|
100
99
|
export const BindingRenderedChunkMeta = __napiModule.exports.BindingRenderedChunkMeta
|
|
101
100
|
export const BindingRenderedModule = __napiModule.exports.BindingRenderedModule
|
|
102
101
|
export const BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext
|
|
102
|
+
export const BindingUrlResolver = __napiModule.exports.BindingUrlResolver
|
|
103
103
|
export const BindingWatcher = __napiModule.exports.BindingWatcher
|
|
104
104
|
export const BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
105
105
|
export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
@@ -109,7 +109,6 @@ export const TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
|
109
109
|
export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
110
110
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
111
111
|
export const BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
112
|
-
export const BindingJsx = __napiModule.exports.BindingJsx
|
|
113
112
|
export const BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
114
113
|
export const BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
115
114
|
export const BindingPropertyReadSideEffects = __napiModule.exports.BindingPropertyReadSideEffects
|
|
@@ -139,12 +139,12 @@ module.exports.BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
|
139
139
|
module.exports.BindingNormalizedOptions = __napiModule.exports.BindingNormalizedOptions
|
|
140
140
|
module.exports.BindingOutputAsset = __napiModule.exports.BindingOutputAsset
|
|
141
141
|
module.exports.BindingOutputChunk = __napiModule.exports.BindingOutputChunk
|
|
142
|
-
module.exports.BindingOutputs = __napiModule.exports.BindingOutputs
|
|
143
142
|
module.exports.BindingPluginContext = __napiModule.exports.BindingPluginContext
|
|
144
143
|
module.exports.BindingRenderedChunk = __napiModule.exports.BindingRenderedChunk
|
|
145
144
|
module.exports.BindingRenderedChunkMeta = __napiModule.exports.BindingRenderedChunkMeta
|
|
146
145
|
module.exports.BindingRenderedModule = __napiModule.exports.BindingRenderedModule
|
|
147
146
|
module.exports.BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext
|
|
147
|
+
module.exports.BindingUrlResolver = __napiModule.exports.BindingUrlResolver
|
|
148
148
|
module.exports.BindingWatcher = __napiModule.exports.BindingWatcher
|
|
149
149
|
module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
150
150
|
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
@@ -154,7 +154,6 @@ module.exports.TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
|
154
154
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
155
155
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
156
156
|
module.exports.BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
157
|
-
module.exports.BindingJsx = __napiModule.exports.BindingJsx
|
|
158
157
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
159
158
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
160
159
|
module.exports.BindingPropertyReadSideEffects = __napiModule.exports.BindingPropertyReadSideEffects
|
|
Binary file
|
|
@@ -45,13 +45,30 @@ interface CompressOptions {
|
|
|
45
45
|
*/
|
|
46
46
|
dropDebugger?: boolean;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Pass `true` to drop unreferenced functions and variables.
|
|
49
49
|
*
|
|
50
|
-
* Simple direct variable assignments do not count as references unless set to
|
|
50
|
+
* Simple direct variable assignments do not count as references unless set to `keep_assign`.
|
|
51
|
+
* @default true
|
|
51
52
|
*/
|
|
52
|
-
unused?:
|
|
53
|
+
unused?: boolean | 'keep_assign';
|
|
53
54
|
/** Keep function / class names. */
|
|
54
55
|
keepNames?: CompressOptionsKeepNames;
|
|
56
|
+
/**
|
|
57
|
+
* Join consecutive var, let and const statements.
|
|
58
|
+
*
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
joinVars?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Join consecutive simple statements using the comma operator.
|
|
64
|
+
*
|
|
65
|
+
* `a; b` -> `a, b`
|
|
66
|
+
*
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
sequences?: boolean;
|
|
70
|
+
/** Limit the maximum number of iterations for debugging purpose. */
|
|
71
|
+
maxIterations?: number;
|
|
55
72
|
}
|
|
56
73
|
interface CompressOptionsKeepNames {
|
|
57
74
|
/**
|
|
@@ -377,11 +394,11 @@ type ModuleType = 'module' | 'commonjs' | 'json' | 'wasm' | 'addon';
|
|
|
377
394
|
*/
|
|
378
395
|
interface NapiResolveOptions {
|
|
379
396
|
/**
|
|
380
|
-
*
|
|
397
|
+
* Discover tsconfig automatically or use the specified tsconfig.json path.
|
|
381
398
|
*
|
|
382
399
|
* Default `None`
|
|
383
400
|
*/
|
|
384
|
-
tsconfig?: TsconfigOptions;
|
|
401
|
+
tsconfig?: 'auto' | TsconfigOptions;
|
|
385
402
|
/**
|
|
386
403
|
* Alias for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
387
404
|
*
|
|
@@ -1204,10 +1221,6 @@ declare class BindingOutputChunk {
|
|
|
1204
1221
|
get preliminaryFileName(): string;
|
|
1205
1222
|
get name(): string;
|
|
1206
1223
|
}
|
|
1207
|
-
declare class BindingOutputs {
|
|
1208
|
-
get chunks(): Array<BindingOutputChunk>;
|
|
1209
|
-
get assets(): Array<BindingOutputAsset>;
|
|
1210
|
-
}
|
|
1211
1224
|
declare class BindingRenderedChunk {
|
|
1212
1225
|
get name(): string;
|
|
1213
1226
|
get isEntry(): boolean;
|
|
@@ -1224,6 +1237,9 @@ declare class BindingRenderedModule {
|
|
|
1224
1237
|
get code(): string | null;
|
|
1225
1238
|
get renderedExports(): Array<string>;
|
|
1226
1239
|
}
|
|
1240
|
+
declare class BindingUrlResolver {
|
|
1241
|
+
call(url: string, importer?: string): Promise<[string, string | undefined]>;
|
|
1242
|
+
}
|
|
1227
1243
|
declare class BindingWatcherChangeData {
|
|
1228
1244
|
path: string;
|
|
1229
1245
|
kind: string;
|
|
@@ -1236,16 +1252,16 @@ declare class BindingWatcherEvent {
|
|
|
1236
1252
|
bundleErrorData(): BindingBundleErrorEventData;
|
|
1237
1253
|
}
|
|
1238
1254
|
interface BindingAssetPluginConfig {
|
|
1239
|
-
isLib
|
|
1240
|
-
isSsr
|
|
1241
|
-
isWorker
|
|
1242
|
-
urlBase
|
|
1243
|
-
publicDir
|
|
1244
|
-
decodedBase
|
|
1245
|
-
isSkipAssets
|
|
1246
|
-
assetsInclude
|
|
1247
|
-
assetInlineLimit
|
|
1248
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) =>
|
|
1255
|
+
isLib: boolean;
|
|
1256
|
+
isSsr: boolean;
|
|
1257
|
+
isWorker: boolean;
|
|
1258
|
+
urlBase: string;
|
|
1259
|
+
publicDir: string;
|
|
1260
|
+
decodedBase: string;
|
|
1261
|
+
isSkipAssets: boolean;
|
|
1262
|
+
assetsInclude: Array<BindingStringOrRegex>;
|
|
1263
|
+
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1264
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => Promise<undefined | string | BindingRenderBuiltUrlRet>;
|
|
1249
1265
|
}
|
|
1250
1266
|
interface BindingAssetSource {
|
|
1251
1267
|
inner: string | Uint8Array;
|
|
@@ -1257,7 +1273,7 @@ interface BindingBuildImportAnalysisPluginConfig {
|
|
|
1257
1273
|
renderBuiltUrl: boolean;
|
|
1258
1274
|
isRelativeBase: boolean;
|
|
1259
1275
|
}
|
|
1260
|
-
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:react-refresh-wrapper' | 'builtin:reporter' | 'builtin:replace' | 'builtin:
|
|
1276
|
+
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:esm-external-require' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:react-refresh-wrapper' | 'builtin:reporter' | 'builtin:replace' | 'builtin:transform' | 'builtin:vite-css' | 'builtin:vite-css-post' | 'builtin:vite-html' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
|
|
1261
1277
|
interface BindingClientHmrUpdate {
|
|
1262
1278
|
clientId: string;
|
|
1263
1279
|
update: BindingHmrUpdate;
|
|
@@ -1322,11 +1338,21 @@ interface BindingJsonPluginConfig {
|
|
|
1322
1338
|
stringify?: BindingJsonPluginStringify;
|
|
1323
1339
|
}
|
|
1324
1340
|
type BindingJsonPluginStringify = boolean | string;
|
|
1341
|
+
interface BindingJsonSourcemap {
|
|
1342
|
+
file?: string;
|
|
1343
|
+
mappings?: string;
|
|
1344
|
+
sourceRoot?: string;
|
|
1345
|
+
sources?: Array<string | undefined | null>;
|
|
1346
|
+
sourcesContent?: Array<string | undefined | null>;
|
|
1347
|
+
names?: Array<string>;
|
|
1348
|
+
debugId?: string;
|
|
1349
|
+
x_google_ignoreList?: Array<number>;
|
|
1350
|
+
}
|
|
1325
1351
|
interface BindingManifestPluginConfig {
|
|
1326
1352
|
root: string;
|
|
1327
1353
|
outPath: string;
|
|
1328
1354
|
isLegacy?: () => boolean;
|
|
1329
|
-
cssEntries: () =>
|
|
1355
|
+
cssEntries: () => Record<string, string>;
|
|
1330
1356
|
}
|
|
1331
1357
|
interface BindingModulePreloadPolyfillPluginConfig {
|
|
1332
1358
|
isServer?: boolean;
|
|
@@ -1335,6 +1361,10 @@ interface BindingModules {
|
|
|
1335
1361
|
values: Array<BindingRenderedModule>;
|
|
1336
1362
|
keys: Array<string>;
|
|
1337
1363
|
}
|
|
1364
|
+
interface BindingOutputs {
|
|
1365
|
+
chunks: Array<BindingOutputChunk>;
|
|
1366
|
+
assets: Array<BindingOutputAsset>;
|
|
1367
|
+
}
|
|
1338
1368
|
interface BindingReactRefreshWrapperPluginConfig {
|
|
1339
1369
|
cwd: string;
|
|
1340
1370
|
include?: Array<BindingStringOrRegex>;
|
|
@@ -1373,6 +1403,9 @@ interface BindingReporterPluginConfig {
|
|
|
1373
1403
|
warnLargeChunks: boolean;
|
|
1374
1404
|
reportCompressedSize: boolean;
|
|
1375
1405
|
}
|
|
1406
|
+
interface BindingSourcemap {
|
|
1407
|
+
inner: string | BindingJsonSourcemap;
|
|
1408
|
+
}
|
|
1376
1409
|
interface BindingTransformHookExtraArgs {
|
|
1377
1410
|
moduleType: string;
|
|
1378
1411
|
}
|
|
@@ -1385,6 +1418,48 @@ interface BindingTransformPluginConfig {
|
|
|
1385
1418
|
jsxInject?: string;
|
|
1386
1419
|
transformOptions?: TransformOptions;
|
|
1387
1420
|
}
|
|
1421
|
+
interface BindingViteCssPluginConfig {
|
|
1422
|
+
isLib: boolean;
|
|
1423
|
+
publicDir: string;
|
|
1424
|
+
compileCSS: (url: string, importer: string, resolver: BindingUrlResolver) => Promise<{
|
|
1425
|
+
code: string;
|
|
1426
|
+
map?: BindingSourcemap;
|
|
1427
|
+
modules?: Record<string, string>;
|
|
1428
|
+
deps?: Set<string>;
|
|
1429
|
+
}>;
|
|
1430
|
+
resolveUrl: (url: string, importer?: string) => MaybePromise<string | undefined>;
|
|
1431
|
+
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1432
|
+
}
|
|
1433
|
+
interface BindingViteCssPostPluginConfig {
|
|
1434
|
+
isLib: boolean;
|
|
1435
|
+
isSsr: boolean;
|
|
1436
|
+
isWorker: boolean;
|
|
1437
|
+
isClient: boolean;
|
|
1438
|
+
cssCodeSplit: boolean;
|
|
1439
|
+
sourcemap: boolean;
|
|
1440
|
+
assetsDir: string;
|
|
1441
|
+
urlBase: string;
|
|
1442
|
+
decodedBase: string;
|
|
1443
|
+
libCssFilename?: string;
|
|
1444
|
+
isLegacy?: () => boolean;
|
|
1445
|
+
cssMinify?: (css: string) => Promise<string>;
|
|
1446
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => Promise<undefined | string | BindingRenderBuiltUrlRet>;
|
|
1447
|
+
}
|
|
1448
|
+
interface BindingViteHtmlPluginConfig {
|
|
1449
|
+
isLib: boolean;
|
|
1450
|
+
isSsr: boolean;
|
|
1451
|
+
urlBase: string;
|
|
1452
|
+
publicDir: string;
|
|
1453
|
+
decodedBase: string;
|
|
1454
|
+
cssCodeSplit: boolean;
|
|
1455
|
+
modulePreloadPolyfill: boolean;
|
|
1456
|
+
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1457
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => Promise<undefined | string | BindingRenderBuiltUrlRet>;
|
|
1458
|
+
resolveDependencies?: boolean | ((filename: string, dependencies: string[], context: {
|
|
1459
|
+
hostId: string;
|
|
1460
|
+
hostType: 'html' | 'js';
|
|
1461
|
+
}) => Promise<string[]>);
|
|
1462
|
+
}
|
|
1388
1463
|
interface BindingViteResolvePluginConfig {
|
|
1389
1464
|
resolveOptions: BindingViteResolvePluginResolveOptions;
|
|
1390
1465
|
environmentConsumer: string;
|
|
@@ -1393,6 +1468,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1393
1468
|
external: true | string[];
|
|
1394
1469
|
noExternal: true | Array<string | RegExp>;
|
|
1395
1470
|
dedupe: Array<string>;
|
|
1471
|
+
legacyInconsistentCjsInterop?: boolean;
|
|
1396
1472
|
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>;
|
|
1397
1473
|
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>;
|
|
1398
1474
|
resolveSubpathImports: (id: string, importer: string, isRequire: boolean, scan: boolean) => VoidNullable<string>;
|
|
@@ -1433,4 +1509,4 @@ interface PreRenderedChunk {
|
|
|
1433
1509
|
exports: Array<string>;
|
|
1434
1510
|
}
|
|
1435
1511
|
//#endregion
|
|
1436
|
-
export {
|
|
1512
|
+
export { IsolatedDeclarationsResult as A, TransformResult as B, BindingViteCssPluginConfig as C, BindingWasmHelperPluginConfig as D, BindingViteResolvePluginConfig as E, ParserOptions as F, moduleRunnerTransform as H, PreRenderedChunk as I, ResolveResult as L, MinifyOptions as M, NapiResolveOptions as N, BindingWatcherEvent as O, ParseResult as P, ResolverFactory as R, BindingUrlResolver as S, BindingViteHtmlPluginConfig as T, transform as U, isolatedDeclaration as V, BindingRenderedChunk as _, BindingClientHmrUpdate as a, BindingTransformHookExtraArgs as b, BindingHookResolveIdExtraArgs as c, BindingJsonPluginConfig as d, BindingMagicString as f, BindingRebuildStrategy as g, BindingReactRefreshWrapperPluginConfig as h, BindingBundlerImpl as i, JsxOptions as j, IsolatedDeclarationsOptions as k, BindingImportGlobPluginConfig as l, BindingModulePreloadPolyfillPluginConfig as m, BindingBuildImportAnalysisPluginConfig as n, BindingDynamicImportVarsPluginConfig as o, BindingManifestPluginConfig as p, BindingBuiltinPluginName as r, BindingEsmExternalRequirePluginConfig as s, BindingAssetPluginConfig as t, BindingIsolatedDeclarationPluginConfig as u, BindingReplacePluginConfig as v, BindingViteCssPostPluginConfig as w, BindingTransformPluginConfig as x, BindingReporterPluginConfig as y, TransformOptions as z };
|
|
@@ -19,7 +19,7 @@ function unsupported(info) {
|
|
|
19
19
|
function noop(..._args) {}
|
|
20
20
|
|
|
21
21
|
//#endregion
|
|
22
|
-
//#region ../pluginutils/dist/
|
|
22
|
+
//#region ../pluginutils/dist/composable-filters.js
|
|
23
23
|
var And = class {
|
|
24
24
|
kind;
|
|
25
25
|
args;
|
|
@@ -140,4 +140,4 @@ function queries(queryFilter) {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
//#endregion
|
|
143
|
-
export {
|
|
143
|
+
export { include as a, or as c, arraify as d, isPromiseLike as f, unsupported as g, unreachable as h, id as i, queries as l, unimplemented as m, code as n, moduleType as o, noop as p, exclude as r, not as s, and as t, query as u };
|