@rolldown/browser 1.0.0-beta.43 → 1.0.0-beta.44
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 +1048 -75
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -4
- package/dist/experimental-index.browser.mjs +33 -452
- package/dist/experimental-index.d.mts +20 -5
- package/dist/experimental-index.mjs +38 -15
- 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 +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasi-browser.js +1 -1
- package/dist/rolldown-binding.wasi.cjs +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-BkaKdpud.d.mts → binding-0m41EAn-.d.mts} +89 -14
- package/dist/shared/{define-config-D5LB7YAC.d.mts → define-config-BbwLmCDX.d.mts} +193 -87
- package/dist/shared/{dist-CU0dSkK2.mjs → dist-DNFKY37q.mjs} +1 -1
- package/dist/shared/{load-config-DBsf9ada.mjs → load-config-B3FsKQ_6.mjs} +2 -2
- 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-BnIhK3nA.mjs} +184 -324
- package/dist/{src-DXN0YLUN.js → src-CIeG_TGR.js} +393 -503
- 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/dist-
|
|
4
|
-
import { logger } from "./shared/logger-B83ocDok.mjs";
|
|
1
|
+
import { b as BuiltinPlugin, c as createBundlerOptions, f as transformToRollupOutput, l as normalizedStringOrRegex, m as bindingifySourcemap, p as normalizeBindingResult, s as RolldownBuild, x as makeBuiltinPluginCallable, y as PluginDriver } from "./shared/src-BnIhK3nA.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
+
import "./shared/dist-DNFKY37q.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 && {
|
|
@@ -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-BbwLmCDX.mjs";
|
|
2
|
+
import "./shared/binding-0m41EAn-.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/dist-DNFKY37q.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-CIeG_TGR.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-BbwLmCDX.mjs";
|
|
2
|
+
import { I as PreRenderedChunk, f as BindingMagicString } from "./shared/binding-0m41EAn-.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/dist-
|
|
1
|
+
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./shared/src-BnIhK3nA.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
+
import "./shared/dist-DNFKY37q.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/dist-
|
|
1
|
+
import { d as bindingifyPlugin, u as PluginContextData } from "./shared/src-BnIhK3nA.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
+
import "./shared/dist-DNFKY37q.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-BbwLmCDX.mjs";
|
|
2
|
+
import "./shared/binding-0m41EAn-.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -100,6 +100,7 @@ export const BindingRenderedChunk = __napiModule.exports.BindingRenderedChunk
|
|
|
100
100
|
export const BindingRenderedChunkMeta = __napiModule.exports.BindingRenderedChunkMeta
|
|
101
101
|
export const BindingRenderedModule = __napiModule.exports.BindingRenderedModule
|
|
102
102
|
export const BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext
|
|
103
|
+
export const BindingUrlResolver = __napiModule.exports.BindingUrlResolver
|
|
103
104
|
export const BindingWatcher = __napiModule.exports.BindingWatcher
|
|
104
105
|
export const BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
105
106
|
export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
@@ -109,7 +110,6 @@ export const TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
|
109
110
|
export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
110
111
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
111
112
|
export const BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
112
|
-
export const BindingJsx = __napiModule.exports.BindingJsx
|
|
113
113
|
export const BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
114
114
|
export const BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
115
115
|
export const BindingPropertyReadSideEffects = __napiModule.exports.BindingPropertyReadSideEffects
|
|
@@ -145,6 +145,7 @@ module.exports.BindingRenderedChunk = __napiModule.exports.BindingRenderedChunk
|
|
|
145
145
|
module.exports.BindingRenderedChunkMeta = __napiModule.exports.BindingRenderedChunkMeta
|
|
146
146
|
module.exports.BindingRenderedModule = __napiModule.exports.BindingRenderedModule
|
|
147
147
|
module.exports.BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext
|
|
148
|
+
module.exports.BindingUrlResolver = __napiModule.exports.BindingUrlResolver
|
|
148
149
|
module.exports.BindingWatcher = __napiModule.exports.BindingWatcher
|
|
149
150
|
module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
150
151
|
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
@@ -154,7 +155,6 @@ module.exports.TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
|
154
155
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
155
156
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
156
157
|
module.exports.BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
157
|
-
module.exports.BindingJsx = __napiModule.exports.BindingJsx
|
|
158
158
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
159
159
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
160
160
|
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
|
/**
|
|
@@ -1224,6 +1241,9 @@ declare class BindingRenderedModule {
|
|
|
1224
1241
|
get code(): string | null;
|
|
1225
1242
|
get renderedExports(): Array<string>;
|
|
1226
1243
|
}
|
|
1244
|
+
declare class BindingUrlResolver {
|
|
1245
|
+
call(url: string, importer?: string): Promise<[string, string | undefined]>;
|
|
1246
|
+
}
|
|
1227
1247
|
declare class BindingWatcherChangeData {
|
|
1228
1248
|
path: string;
|
|
1229
1249
|
kind: string;
|
|
@@ -1236,15 +1256,15 @@ declare class BindingWatcherEvent {
|
|
|
1236
1256
|
bundleErrorData(): BindingBundleErrorEventData;
|
|
1237
1257
|
}
|
|
1238
1258
|
interface BindingAssetPluginConfig {
|
|
1239
|
-
isLib
|
|
1240
|
-
isSsr
|
|
1241
|
-
isWorker
|
|
1242
|
-
urlBase
|
|
1243
|
-
publicDir
|
|
1244
|
-
decodedBase
|
|
1245
|
-
isSkipAssets
|
|
1246
|
-
assetsInclude
|
|
1247
|
-
assetInlineLimit
|
|
1259
|
+
isLib: boolean;
|
|
1260
|
+
isSsr: boolean;
|
|
1261
|
+
isWorker: boolean;
|
|
1262
|
+
urlBase: string;
|
|
1263
|
+
publicDir: string;
|
|
1264
|
+
decodedBase: string;
|
|
1265
|
+
isSkipAssets: boolean;
|
|
1266
|
+
assetsInclude: Array<BindingStringOrRegex>;
|
|
1267
|
+
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1248
1268
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => MaybePromise<VoidNullable<string | BindingRenderBuiltUrlRet>>;
|
|
1249
1269
|
}
|
|
1250
1270
|
interface BindingAssetSource {
|
|
@@ -1257,7 +1277,7 @@ interface BindingBuildImportAnalysisPluginConfig {
|
|
|
1257
1277
|
renderBuiltUrl: boolean;
|
|
1258
1278
|
isRelativeBase: boolean;
|
|
1259
1279
|
}
|
|
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:
|
|
1280
|
+
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
1281
|
interface BindingClientHmrUpdate {
|
|
1262
1282
|
clientId: string;
|
|
1263
1283
|
update: BindingHmrUpdate;
|
|
@@ -1322,6 +1342,16 @@ interface BindingJsonPluginConfig {
|
|
|
1322
1342
|
stringify?: BindingJsonPluginStringify;
|
|
1323
1343
|
}
|
|
1324
1344
|
type BindingJsonPluginStringify = boolean | string;
|
|
1345
|
+
interface BindingJsonSourcemap {
|
|
1346
|
+
file?: string;
|
|
1347
|
+
mappings?: string;
|
|
1348
|
+
sourceRoot?: string;
|
|
1349
|
+
sources?: Array<string | undefined | null>;
|
|
1350
|
+
sourcesContent?: Array<string | undefined | null>;
|
|
1351
|
+
names?: Array<string>;
|
|
1352
|
+
debugId?: string;
|
|
1353
|
+
x_google_ignoreList?: Array<number>;
|
|
1354
|
+
}
|
|
1325
1355
|
interface BindingManifestPluginConfig {
|
|
1326
1356
|
root: string;
|
|
1327
1357
|
outPath: string;
|
|
@@ -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) => MaybePromise<VoidNullable<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) => MaybePromise<VoidNullable<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;
|
|
@@ -1433,4 +1508,4 @@ interface PreRenderedChunk {
|
|
|
1433
1508
|
exports: Array<string>;
|
|
1434
1509
|
}
|
|
1435
1510
|
//#endregion
|
|
1436
|
-
export {
|
|
1511
|
+
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 };
|