@rolldown/browser 1.0.0-beta.36 → 1.0.0-beta.38
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.d.mts +1 -1
- package/dist/cli.mjs +127 -1304
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +541 -13
- package/dist/experimental-index.d.mts +50 -5
- package/dist/experimental-index.mjs +100 -14
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.d.mts +1 -1
- 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 -0
- package/dist/rolldown-binding.wasi.cjs +1 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-wK0CRIMb.d.mts → binding-D6vpD1fz.d.mts} +9 -24
- package/dist/shared/{define-config-BcNhk996.d.mts → define-config-D-OneP9q.d.mts} +11 -9
- package/dist/shared/{load-config-M8Gvqt1X.mjs → load-config-BGatf3rT.mjs} +2 -2
- package/dist/shared/logger-CiCY7ucm.mjs +988 -0
- package/dist/shared/{parse-ast-index-C3TkGcEQ.mjs → parse-ast-index-CR2E9ZQS.mjs} +2 -2
- package/dist/shared/{src-Dc4fRARy.mjs → src-E1KQKxjT.mjs} +441 -633
- package/dist/{src-Cl6h35QH.js → src-DE1CLQYz.js} +163 -234
- package/package.json +5 -6
- /package/dist/shared/{prompt-DuG2i9ud.mjs → prompt-D2FxOcB5.mjs} +0 -0
|
@@ -1,13 +1,49 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReactRefreshWrapperPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-D6vpD1fz.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-D-OneP9q.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-options.d.ts
|
|
5
5
|
interface DevWatchOptions {
|
|
6
|
+
/**
|
|
7
|
+
* If `true`, files are not written to disk.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
skipWrite?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* If `true`, use polling instead of native file system events for watching.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
6
15
|
usePolling?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Poll interval in milliseconds (only used when usePolling is true).
|
|
18
|
+
* @default 100
|
|
19
|
+
*/
|
|
7
20
|
pollInterval?: number;
|
|
21
|
+
/**
|
|
22
|
+
* If `true`, use debounced watcher. If `false`, use non-debounced watcher for immediate responses.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
useDebounce?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Debounce duration in milliseconds (only used when useDebounce is true).
|
|
28
|
+
* @default 10
|
|
29
|
+
*/
|
|
30
|
+
debounceDuration?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to compare file contents for poll-based watchers (only used when usePolling is true).
|
|
33
|
+
* When enabled, poll watchers will check file contents to determine if they actually changed.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
compareContentsForPolling?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Tick rate in milliseconds for debounced watchers (only used when useDebounce is true).
|
|
39
|
+
* Controls how frequently the debouncer checks for events to process.
|
|
40
|
+
* When not specified, the debouncer will auto-select an appropriate tick rate (1/4 of the debounce duration).
|
|
41
|
+
* @default undefined (auto-select)
|
|
42
|
+
*/
|
|
43
|
+
debounceTickRate?: number;
|
|
8
44
|
}
|
|
9
45
|
interface DevOptions {
|
|
10
|
-
onHmrUpdates?: (updates: BindingHmrUpdate[]) => void | Promise<void>;
|
|
46
|
+
onHmrUpdates?: (updates: BindingHmrUpdate[], changedFiles: string[]) => void | Promise<void>;
|
|
11
47
|
watch?: DevWatchOptions;
|
|
12
48
|
}
|
|
13
49
|
//#endregion
|
|
@@ -19,6 +55,10 @@ declare class DevEngine {
|
|
|
19
55
|
run(): Promise<void>;
|
|
20
56
|
ensureCurrentBuildFinish(): Promise<void>;
|
|
21
57
|
ensureLatestBuild(): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Returns true if a new build is scheduled.
|
|
60
|
+
*/
|
|
61
|
+
scheduleBuildIfStale(): Promise<"scheduled" | "alreadyScheduled" | undefined>;
|
|
22
62
|
invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingHmrUpdate>;
|
|
23
63
|
}
|
|
24
64
|
//#endregion
|
|
@@ -31,7 +71,7 @@ declare var dev: typeof DevEngine.create;
|
|
|
31
71
|
*
|
|
32
72
|
* Calling this API will only execute the scan stage of rolldown.
|
|
33
73
|
*/
|
|
34
|
-
declare const
|
|
74
|
+
declare const scan: (input: InputOptions) => Promise<void>;
|
|
35
75
|
//#endregion
|
|
36
76
|
//#region src/builtin-plugin/constructors.d.ts
|
|
37
77
|
declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -53,6 +93,11 @@ declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPl
|
|
|
53
93
|
declare function assetPlugin(config?: BindingAssetPluginConfig): BuiltinPlugin;
|
|
54
94
|
declare function webWorkerPostPlugin(): BuiltinPlugin;
|
|
55
95
|
declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
|
|
96
|
+
type ReactRefreshWrapperPluginConfig = Omit<BindingReactRefreshWrapperPluginConfig, "include" | "exclude"> & {
|
|
97
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
98
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
99
|
+
};
|
|
100
|
+
declare function reactRefreshWrapperPlugin(config: ReactRefreshWrapperPluginConfig): BuiltinPlugin;
|
|
56
101
|
//#endregion
|
|
57
102
|
//#region src/builtin-plugin/alias-plugin.d.ts
|
|
58
103
|
type AliasPluginAlias = {
|
|
@@ -99,4 +144,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
|
|
|
99
144
|
};
|
|
100
145
|
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
101
146
|
//#endregion
|
|
102
|
-
export { DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin,
|
|
147
|
+
export { DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./shared/src-E1KQKxjT.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CR2E9ZQS.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { logger } from "./shared/logger-CiCY7ucm.mjs";
|
|
5
|
+
import { BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
5
6
|
import { pathToFileURL } from "node:url";
|
|
6
7
|
|
|
7
8
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -14,8 +15,13 @@ var DevEngine = class DevEngine {
|
|
|
14
15
|
const bindingDevOptions = {
|
|
15
16
|
onHmrUpdates: devOptions.onHmrUpdates,
|
|
16
17
|
watch: devOptions.watch && {
|
|
18
|
+
skipWrite: devOptions.watch.skipWrite,
|
|
17
19
|
usePolling: devOptions.watch.usePolling,
|
|
18
|
-
pollInterval: devOptions.watch.pollInterval
|
|
20
|
+
pollInterval: devOptions.watch.pollInterval,
|
|
21
|
+
useDebounce: devOptions.watch.useDebounce,
|
|
22
|
+
debounceDuration: devOptions.watch.debounceDuration,
|
|
23
|
+
compareContentsForPolling: devOptions.watch.compareContentsForPolling,
|
|
24
|
+
debounceTickRate: devOptions.watch.debounceTickRate
|
|
19
25
|
}
|
|
20
26
|
};
|
|
21
27
|
const inner = new BindingDevEngine(options.bundlerOptions, bindingDevOptions);
|
|
@@ -38,6 +44,16 @@ var DevEngine = class DevEngine {
|
|
|
38
44
|
async ensureLatestBuild() {
|
|
39
45
|
await this.#inner.ensureLatestBuild();
|
|
40
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns true if a new build is scheduled.
|
|
49
|
+
*/
|
|
50
|
+
async scheduleBuildIfStale() {
|
|
51
|
+
const scheduled = await this.#inner.scheduleBuildIfStale();
|
|
52
|
+
if (scheduled) {
|
|
53
|
+
scheduled.wait().catch(() => {});
|
|
54
|
+
return scheduled.alreadyScheduled() ? "alreadyScheduled" : "scheduled";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
41
57
|
async invalidate(file, firstInvalidatedBy) {
|
|
42
58
|
return this.#inner.invalidate(file, firstInvalidatedBy);
|
|
43
59
|
}
|
|
@@ -54,12 +70,14 @@ var dev = DevEngine.create;
|
|
|
54
70
|
*
|
|
55
71
|
* Calling this API will only execute the scan stage of rolldown.
|
|
56
72
|
*/
|
|
57
|
-
const
|
|
73
|
+
const scan = async (input) => {
|
|
58
74
|
const inputOptions = await PluginDriver.callOptionsHook(input);
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
75
|
+
const build = new RolldownBuild(inputOptions);
|
|
76
|
+
try {
|
|
77
|
+
await build.scan();
|
|
78
|
+
} finally {
|
|
79
|
+
await build.close();
|
|
80
|
+
}
|
|
63
81
|
};
|
|
64
82
|
|
|
65
83
|
//#endregion
|
|
@@ -73,10 +91,72 @@ function defineParallelPlugin(pluginPath) {
|
|
|
73
91
|
};
|
|
74
92
|
}
|
|
75
93
|
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/builtin-plugin/constructors.ts
|
|
96
|
+
function modulePreloadPolyfillPlugin(config) {
|
|
97
|
+
return new BuiltinPlugin("builtin:module-preload-polyfill", config);
|
|
98
|
+
}
|
|
99
|
+
function dynamicImportVarsPlugin(config) {
|
|
100
|
+
if (config) {
|
|
101
|
+
config.include = normalizedStringOrRegex(config.include);
|
|
102
|
+
config.exclude = normalizedStringOrRegex(config.exclude);
|
|
103
|
+
}
|
|
104
|
+
return new BuiltinPlugin("builtin:dynamic-import-vars", config);
|
|
105
|
+
}
|
|
106
|
+
function importGlobPlugin(config) {
|
|
107
|
+
return new BuiltinPlugin("builtin:import-glob", config);
|
|
108
|
+
}
|
|
109
|
+
function reporterPlugin(config) {
|
|
110
|
+
return new BuiltinPlugin("builtin:reporter", config);
|
|
111
|
+
}
|
|
112
|
+
function manifestPlugin(config) {
|
|
113
|
+
return new BuiltinPlugin("builtin:manifest", config);
|
|
114
|
+
}
|
|
115
|
+
function wasmHelperPlugin(config) {
|
|
116
|
+
return new BuiltinPlugin("builtin:wasm-helper", config);
|
|
117
|
+
}
|
|
118
|
+
function wasmFallbackPlugin() {
|
|
119
|
+
const builtinPlugin = new BuiltinPlugin("builtin:wasm-fallback");
|
|
120
|
+
return makeBuiltinPluginCallable(builtinPlugin);
|
|
121
|
+
}
|
|
122
|
+
function loadFallbackPlugin() {
|
|
123
|
+
return new BuiltinPlugin("builtin:load-fallback");
|
|
124
|
+
}
|
|
125
|
+
function jsonPlugin(config) {
|
|
126
|
+
const builtinPlugin = new BuiltinPlugin("builtin:json", config);
|
|
127
|
+
return makeBuiltinPluginCallable(builtinPlugin);
|
|
128
|
+
}
|
|
129
|
+
function buildImportAnalysisPlugin(config) {
|
|
130
|
+
return new BuiltinPlugin("builtin:build-import-analysis", config);
|
|
131
|
+
}
|
|
132
|
+
function viteResolvePlugin(config) {
|
|
133
|
+
const builtinPlugin = new BuiltinPlugin("builtin:vite-resolve", config);
|
|
134
|
+
return makeBuiltinPluginCallable(builtinPlugin);
|
|
135
|
+
}
|
|
136
|
+
function isolatedDeclarationPlugin(config) {
|
|
137
|
+
return new BuiltinPlugin("builtin:isolated-declaration", config);
|
|
138
|
+
}
|
|
139
|
+
function assetPlugin(config) {
|
|
140
|
+
return new BuiltinPlugin("builtin:asset", config);
|
|
141
|
+
}
|
|
142
|
+
function webWorkerPostPlugin() {
|
|
143
|
+
return new BuiltinPlugin("builtin:web-worker-post");
|
|
144
|
+
}
|
|
145
|
+
function esmExternalRequirePlugin(config) {
|
|
146
|
+
return new BuiltinPlugin("builtin:esm-external-require", config);
|
|
147
|
+
}
|
|
148
|
+
function reactRefreshWrapperPlugin(config) {
|
|
149
|
+
if (config) {
|
|
150
|
+
config.include = normalizedStringOrRegex(config.include);
|
|
151
|
+
config.exclude = normalizedStringOrRegex(config.exclude);
|
|
152
|
+
}
|
|
153
|
+
return new BuiltinPlugin("builtin:react-refresh-wrapper", config);
|
|
154
|
+
}
|
|
155
|
+
|
|
76
156
|
//#endregion
|
|
77
157
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
78
158
|
function aliasPlugin(config) {
|
|
79
|
-
return
|
|
159
|
+
return new BuiltinPlugin("builtin:alias", config);
|
|
80
160
|
}
|
|
81
161
|
|
|
82
162
|
//#endregion
|
|
@@ -104,10 +184,16 @@ function aliasPlugin(config) {
|
|
|
104
184
|
* ```
|
|
105
185
|
*/
|
|
106
186
|
function replacePlugin(values = {}, options = {}) {
|
|
187
|
+
let hasNonStringValues = false;
|
|
107
188
|
Object.keys(values).forEach((key) => {
|
|
108
|
-
|
|
189
|
+
const value = values[key];
|
|
190
|
+
if (typeof value !== "string") {
|
|
191
|
+
hasNonStringValues = true;
|
|
192
|
+
values[key] = String(value);
|
|
193
|
+
}
|
|
109
194
|
});
|
|
110
|
-
|
|
195
|
+
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.");
|
|
196
|
+
return new BuiltinPlugin("builtin:replace", {
|
|
111
197
|
...options,
|
|
112
198
|
values
|
|
113
199
|
});
|
|
@@ -123,8 +209,8 @@ function transformPlugin(config) {
|
|
|
123
209
|
jsxRefreshInclude: normalizedStringOrRegex(config.jsxRefreshInclude),
|
|
124
210
|
jsxRefreshExclude: normalizedStringOrRegex(config.jsxRefreshExclude)
|
|
125
211
|
};
|
|
126
|
-
return
|
|
212
|
+
return new BuiltinPlugin("builtin:transform", config);
|
|
127
213
|
}
|
|
128
214
|
|
|
129
215
|
//#endregion
|
|
130
|
-
export { DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin,
|
|
216
|
+
export { DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-D6vpD1fz.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-D-OneP9q.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/index.browser.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, 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, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
3
|
-
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, 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, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-D6vpD1fz.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, 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, 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 } from "./shared/define-config-D-OneP9q.mjs";
|
|
3
|
+
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, 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 { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-E1KQKxjT.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CR2E9ZQS.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-E1KQKxjT.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CR2E9ZQS.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
|
-
import { registerPlugins } from "./rolldown-binding.wasi.
|
|
5
|
+
import { registerPlugins } from "./rolldown-binding.wasi-browser.js";
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
8
|
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-D6vpD1fz.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-D-OneP9q.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
|
@@ -103,6 +103,7 @@ export const BindingWatcher = __napiModule.exports.BindingWatcher
|
|
|
103
103
|
export const BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
104
104
|
export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
105
105
|
export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
106
|
+
export const ScheduledBuild = __napiModule.exports.ScheduledBuild
|
|
106
107
|
export const TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
107
108
|
export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
108
109
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
@@ -148,6 +148,7 @@ module.exports.BindingWatcher = __napiModule.exports.BindingWatcher
|
|
|
148
148
|
module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
149
149
|
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
150
150
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
151
|
+
module.exports.ScheduledBuild = __napiModule.exports.ScheduledBuild
|
|
151
152
|
module.exports.TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
152
153
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
153
154
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
Binary file
|
|
@@ -95,9 +95,6 @@ interface MangleOptionsKeepNames {
|
|
|
95
95
|
*/
|
|
96
96
|
class: boolean;
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
/** Minify synchronously. */
|
|
100
|
-
|
|
101
98
|
interface MinifyOptions {
|
|
102
99
|
/** Use when minifying an ES6 module. */
|
|
103
100
|
module?: boolean;
|
|
@@ -199,13 +196,6 @@ type ImportNameKind = /** `import { x } from "mod"` */
|
|
|
199
196
|
'Name' | /** `import * as ns from "mod"` */
|
|
200
197
|
'NamespaceObject' | /** `import defaultExport from "mod"` */
|
|
201
198
|
'Default';
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Parse asynchronously.
|
|
205
|
-
*
|
|
206
|
-
* Note: This function can be slower than `parseSync` due to the overhead of spawning a thread.
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
199
|
interface ParserOptions {
|
|
210
200
|
/** Treat the source text as `js`, `jsx`, `ts`, `tsx` or `dts`. */
|
|
211
201
|
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts';
|
|
@@ -246,9 +236,6 @@ interface ParserOptions {
|
|
|
246
236
|
*/
|
|
247
237
|
showSemanticErrors?: boolean;
|
|
248
238
|
}
|
|
249
|
-
|
|
250
|
-
/** Parse synchronously. */
|
|
251
|
-
|
|
252
239
|
interface Span {
|
|
253
240
|
start: number;
|
|
254
241
|
end: number;
|
|
@@ -354,7 +341,6 @@ declare class ResolverFactory {
|
|
|
354
341
|
/** Asynchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
355
342
|
async(directory: string, request: string): Promise<ResolveResult>;
|
|
356
343
|
}
|
|
357
|
-
|
|
358
344
|
/** Node.js builtin module when `Options::builtin_modules` is enabled. */
|
|
359
345
|
interface Builtin {
|
|
360
346
|
/**
|
|
@@ -376,7 +362,6 @@ declare enum EnforceExtension {
|
|
|
376
362
|
Disabled = 2,
|
|
377
363
|
}
|
|
378
364
|
type ModuleType = 'module' | 'commonjs' | 'json' | 'wasm' | 'addon';
|
|
379
|
-
|
|
380
365
|
/**
|
|
381
366
|
* Module Resolution Options
|
|
382
367
|
*
|
|
@@ -571,7 +556,6 @@ interface ResolveResult {
|
|
|
571
556
|
/** `package.json` path for the given module. */
|
|
572
557
|
packageJsonPath?: string;
|
|
573
558
|
}
|
|
574
|
-
|
|
575
559
|
/**
|
|
576
560
|
* Alias Value for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
577
561
|
* Use struct because napi don't support structured union now
|
|
@@ -706,7 +690,6 @@ type HelperMode =
|
|
|
706
690
|
interface Helpers {
|
|
707
691
|
mode?: HelperMode;
|
|
708
692
|
}
|
|
709
|
-
|
|
710
693
|
/** TypeScript Isolated Declarations for Standalone DTS Emit */
|
|
711
694
|
declare function isolatedDeclaration(filename: string, sourceText: string, options?: IsolatedDeclarationsOptions | undefined | null): IsolatedDeclarationsResult;
|
|
712
695
|
interface IsolatedDeclarationsOptions {
|
|
@@ -726,7 +709,6 @@ interface IsolatedDeclarationsResult {
|
|
|
726
709
|
map?: SourceMap;
|
|
727
710
|
errors: Array<OxcError>;
|
|
728
711
|
}
|
|
729
|
-
|
|
730
712
|
/**
|
|
731
713
|
* Configure how TSX and JSX are transformed.
|
|
732
714
|
*
|
|
@@ -821,7 +803,6 @@ interface JsxOptions {
|
|
|
821
803
|
*/
|
|
822
804
|
refresh?: boolean | ReactRefreshOptions;
|
|
823
805
|
}
|
|
824
|
-
|
|
825
806
|
/**
|
|
826
807
|
* Transform JavaScript code to a Vite Node runnable module.
|
|
827
808
|
*
|
|
@@ -890,7 +871,6 @@ interface ReactRefreshOptions {
|
|
|
890
871
|
refreshSig?: string;
|
|
891
872
|
emitFullSignatures?: boolean;
|
|
892
873
|
}
|
|
893
|
-
|
|
894
874
|
/**
|
|
895
875
|
* Configure how styled-components are transformed.
|
|
896
876
|
*
|
|
@@ -969,7 +949,6 @@ interface StyledComponentsOptions {
|
|
|
969
949
|
*/
|
|
970
950
|
topLevelImportPaths?: Array<string>;
|
|
971
951
|
}
|
|
972
|
-
|
|
973
952
|
/**
|
|
974
953
|
* Transpile a JavaScript or TypeScript into a target ECMAScript version.
|
|
975
954
|
*
|
|
@@ -983,7 +962,6 @@ interface StyledComponentsOptions {
|
|
|
983
962
|
* errors that occurred during parsing or transformation.
|
|
984
963
|
*/
|
|
985
964
|
declare function transform(filename: string, sourceText: string, options?: TransformOptions | undefined | null): TransformResult;
|
|
986
|
-
|
|
987
965
|
/**
|
|
988
966
|
* Options for transforming a JavaScript or TypeScript file.
|
|
989
967
|
*
|
|
@@ -1264,7 +1242,7 @@ interface BindingBuildImportAnalysisPluginConfig {
|
|
|
1264
1242
|
renderBuiltUrl: boolean;
|
|
1265
1243
|
isRelativeBase: boolean;
|
|
1266
1244
|
}
|
|
1267
|
-
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:
|
|
1245
|
+
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:esm-external-require' | 'builtin:transform' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
|
|
1268
1246
|
interface BindingDynamicImportVarsPluginConfig {
|
|
1269
1247
|
include?: Array<BindingStringOrRegex>;
|
|
1270
1248
|
exclude?: Array<BindingStringOrRegex>;
|
|
@@ -1276,6 +1254,7 @@ interface BindingError {
|
|
|
1276
1254
|
}
|
|
1277
1255
|
interface BindingEsmExternalRequirePluginConfig {
|
|
1278
1256
|
external: Array<BindingStringOrRegex>;
|
|
1257
|
+
skipDuplicateCheck?: boolean;
|
|
1279
1258
|
}
|
|
1280
1259
|
type BindingGenerateHmrPatchReturn = {
|
|
1281
1260
|
type: 'Ok';
|
|
@@ -1341,6 +1320,12 @@ interface BindingModules {
|
|
|
1341
1320
|
values: Array<BindingRenderedModule>;
|
|
1342
1321
|
keys: Array<string>;
|
|
1343
1322
|
}
|
|
1323
|
+
interface BindingReactRefreshWrapperPluginConfig {
|
|
1324
|
+
include?: Array<BindingStringOrRegex>;
|
|
1325
|
+
exclude?: Array<BindingStringOrRegex>;
|
|
1326
|
+
jsxImportSource: string;
|
|
1327
|
+
reactRefreshHost: string;
|
|
1328
|
+
}
|
|
1344
1329
|
interface BindingRenderBuiltUrlConfig {
|
|
1345
1330
|
ssr: boolean;
|
|
1346
1331
|
type: 'asset' | 'public';
|
|
@@ -1423,4 +1408,4 @@ interface PreRenderedChunk {
|
|
|
1423
1408
|
exports: Array<string>;
|
|
1424
1409
|
}
|
|
1425
1410
|
//#endregion
|
|
1426
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, MinifyOptions, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
1411
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReactRefreshWrapperPluginConfig, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, MinifyOptions, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-D6vpD1fz.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -481,8 +481,10 @@ declare function build(options: BuildOptions[]): Promise<RolldownOutput[]>;
|
|
|
481
481
|
//#region src/api/rolldown/rolldown-build.d.ts
|
|
482
482
|
declare class RolldownBuild {
|
|
483
483
|
#private;
|
|
484
|
+
static asyncRuntimeShutdown: boolean;
|
|
484
485
|
constructor(inputOptions: InputOptions);
|
|
485
486
|
get closed(): boolean;
|
|
487
|
+
scan(): Promise<void>;
|
|
486
488
|
generate(outputOptions?: OutputOptions): Promise<RolldownOutput>;
|
|
487
489
|
write(outputOptions?: OutputOptions): Promise<RolldownOutput>;
|
|
488
490
|
close(): Promise<void>;
|
|
@@ -802,6 +804,9 @@ interface OutputBundle {
|
|
|
802
804
|
[fileName: string]: OutputAsset | OutputChunk;
|
|
803
805
|
}
|
|
804
806
|
//#endregion
|
|
807
|
+
//#region src/types/rolldown-options-function.d.ts
|
|
808
|
+
type RolldownOptionsFunction = (commandLineArguments: Record<string, any>) => MaybePromise<RolldownOptions | RolldownOptions[]>;
|
|
809
|
+
//#endregion
|
|
805
810
|
//#region src/types/sourcemap.d.ts
|
|
806
811
|
interface ExistingRawSourceMap {
|
|
807
812
|
file?: string | null;
|
|
@@ -819,15 +824,11 @@ type SourceMapInput = ExistingRawSourceMap | string | null;
|
|
|
819
824
|
declare const VERSION: string;
|
|
820
825
|
//#endregion
|
|
821
826
|
//#region src/builtin-plugin/utils.d.ts
|
|
822
|
-
declare const BuiltinClassSymbol: symbol;
|
|
823
827
|
declare class BuiltinPlugin {
|
|
824
828
|
name: BindingBuiltinPluginName;
|
|
825
829
|
_options?: unknown;
|
|
826
830
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
827
831
|
}
|
|
828
|
-
interface BuiltinPlugin {
|
|
829
|
-
[BuiltinClassSymbol]: boolean;
|
|
830
|
-
}
|
|
831
832
|
//#endregion
|
|
832
833
|
//#region src/constants/plugin.d.ts
|
|
833
834
|
declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
|
|
@@ -1143,7 +1144,7 @@ interface InputOptions {
|
|
|
1143
1144
|
* > If you want to call `resolveId` hooks of other plugin, use `aliasPlugin` from `rolldown/experimental` instead.
|
|
1144
1145
|
* > You could find more discussion in [this issue](https://github.com/rolldown/rolldown/issues/3615)
|
|
1145
1146
|
*/
|
|
1146
|
-
alias?: Record<string, string[] | string>;
|
|
1147
|
+
alias?: Record<string, string[] | string | false>;
|
|
1147
1148
|
aliasFields?: string[][];
|
|
1148
1149
|
conditionNames?: string[];
|
|
1149
1150
|
/**
|
|
@@ -1347,7 +1348,7 @@ interface InputOptions {
|
|
|
1347
1348
|
inject?: Record<string, string | [string, string]>;
|
|
1348
1349
|
profilerNames?: boolean;
|
|
1349
1350
|
/**
|
|
1350
|
-
* @deprecated Use
|
|
1351
|
+
* @deprecated Use `transform.jsx` instead.
|
|
1351
1352
|
*
|
|
1352
1353
|
* This top-level `jsx` option will be removed in a future release.
|
|
1353
1354
|
* It is only kept for backward compatibility and will be mapped internally to `transform.jsx`.
|
|
@@ -1411,11 +1412,12 @@ interface RolldownOptions extends InputOptions {
|
|
|
1411
1412
|
/**
|
|
1412
1413
|
* Type for `default export` of `rolldown.config.js` file.
|
|
1413
1414
|
*/
|
|
1414
|
-
type ConfigExport = RolldownOptions | RolldownOptions[];
|
|
1415
|
+
type ConfigExport = RolldownOptions | RolldownOptions[] | RolldownOptionsFunction;
|
|
1415
1416
|
//#endregion
|
|
1416
1417
|
//#region src/utils/define-config.d.ts
|
|
1417
1418
|
declare function defineConfig(config: RolldownOptions): RolldownOptions;
|
|
1418
1419
|
declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
1420
|
+
declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
|
|
1419
1421
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1420
1422
|
//#endregion
|
|
1421
|
-
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, MaybePromise, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, defineParallelPlugin, rolldown, watch, withFilter };
|
|
1423
|
+
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, MaybePromise, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, defineParallelPlugin, rolldown, watch, withFilter };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { rolldown } from "./src-
|
|
1
|
+
import { rolldown } from "./src-E1KQKxjT.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
3
|
import { readdir } from "node:fs/promises";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { cwd } from "node:process";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
|