@rolldown/browser 1.0.0-beta.37 → 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 +82 -297
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +74 -30
- package/dist/experimental-index.d.mts +14 -4
- package/dist/experimental-index.mjs +74 -9
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +2 -2
- 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.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-Cjs27cfu.d.mts → binding-D6vpD1fz.d.mts} +9 -24
- package/dist/shared/{define-config-DzsPS4fI.d.mts → define-config-D-OneP9q.d.mts} +5 -3
- package/dist/shared/{load-config-efyGD8HY.mjs → load-config-BGatf3rT.mjs} +2 -2
- package/dist/shared/{parse-ast-index-C3TkGcEQ.mjs → parse-ast-index-CR2E9ZQS.mjs} +2 -2
- package/dist/shared/{src-kVjGhYdF.mjs → src-E1KQKxjT.mjs} +438 -622
- package/dist/{src-C2GHZXDs.js → src-DE1CLQYz.js} +160 -223
- package/package.json +5 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver,
|
|
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
4
|
import { logger } from "./shared/logger-CiCY7ucm.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
|
|
8
8
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -15,6 +15,7 @@ var DevEngine = class DevEngine {
|
|
|
15
15
|
const bindingDevOptions = {
|
|
16
16
|
onHmrUpdates: devOptions.onHmrUpdates,
|
|
17
17
|
watch: devOptions.watch && {
|
|
18
|
+
skipWrite: devOptions.watch.skipWrite,
|
|
18
19
|
usePolling: devOptions.watch.usePolling,
|
|
19
20
|
pollInterval: devOptions.watch.pollInterval,
|
|
20
21
|
useDebounce: devOptions.watch.useDebounce,
|
|
@@ -69,12 +70,14 @@ var dev = DevEngine.create;
|
|
|
69
70
|
*
|
|
70
71
|
* Calling this API will only execute the scan stage of rolldown.
|
|
71
72
|
*/
|
|
72
|
-
const
|
|
73
|
+
const scan = async (input) => {
|
|
73
74
|
const inputOptions = await PluginDriver.callOptionsHook(input);
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
const build = new RolldownBuild(inputOptions);
|
|
76
|
+
try {
|
|
77
|
+
await build.scan();
|
|
78
|
+
} finally {
|
|
79
|
+
await build.close();
|
|
80
|
+
}
|
|
78
81
|
};
|
|
79
82
|
|
|
80
83
|
//#endregion
|
|
@@ -88,6 +91,68 @@ function defineParallelPlugin(pluginPath) {
|
|
|
88
91
|
};
|
|
89
92
|
}
|
|
90
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
|
+
|
|
91
156
|
//#endregion
|
|
92
157
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
93
158
|
function aliasPlugin(config) {
|
|
@@ -148,4 +213,4 @@ function transformPlugin(config) {
|
|
|
148
213
|
}
|
|
149
214
|
|
|
150
215
|
//#endregion
|
|
151
|
-
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, 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-
|
|
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
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
|
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>;
|
|
@@ -1142,7 +1144,7 @@ interface InputOptions {
|
|
|
1142
1144
|
* > If you want to call `resolveId` hooks of other plugin, use `aliasPlugin` from `rolldown/experimental` instead.
|
|
1143
1145
|
* > You could find more discussion in [this issue](https://github.com/rolldown/rolldown/issues/3615)
|
|
1144
1146
|
*/
|
|
1145
|
-
alias?: Record<string, string[] | string>;
|
|
1147
|
+
alias?: Record<string, string[] | string | false>;
|
|
1146
1148
|
aliasFields?: string[][];
|
|
1147
1149
|
conditionNames?: string[];
|
|
1148
1150
|
/**
|
|
@@ -1346,7 +1348,7 @@ interface InputOptions {
|
|
|
1346
1348
|
inject?: Record<string, string | [string, string]>;
|
|
1347
1349
|
profilerNames?: boolean;
|
|
1348
1350
|
/**
|
|
1349
|
-
* @deprecated Use
|
|
1351
|
+
* @deprecated Use `transform.jsx` instead.
|
|
1350
1352
|
*
|
|
1351
1353
|
* This top-level `jsx` option will be removed in a future release.
|
|
1352
1354
|
* It is only kept for backward compatibility and will be mapped internally to `transform.jsx`.
|
|
@@ -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
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseAsync, parseSync } from "../rolldown-binding.wasi.
|
|
1
|
+
import { parseAsync, parseSync } from "../rolldown-binding.wasi-browser.js";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/code-frame.ts
|
|
4
4
|
function spaces(index) {
|
|
@@ -186,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
189
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.89.0/node_modules/oxc-parser/wrap.mjs
|
|
190
190
|
function wrap$1(result) {
|
|
191
191
|
let program, module, comments, errors;
|
|
192
192
|
return {
|