rolldown 1.1.1 → 1.1.3
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.mjs +25 -14
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -2
- package/dist/experimental-index.d.mts +15 -5
- package/dist/experimental-index.mjs +21 -16
- package/dist/filter-index.d.mts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -4
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/shared/{binding-DgGsNpT9.d.mts → binding-B1q9aYT-.d.mts} +65 -142
- package/dist/shared/{binding-CfwqjDbP.mjs → binding-Dh6LYCIB.mjs} +39 -34
- package/dist/shared/{bindingify-input-options-B7_WBoOp.mjs → bindingify-input-options-CzVhGygm.mjs} +1329 -1330
- package/dist/shared/{constructors-DnT9y_13.mjs → constructors-688OwP2q.mjs} +2 -5
- package/dist/shared/{constructors-Bx1tSad6.d.mts → constructors-awZ1VNvg.d.mts} +3 -4
- package/dist/shared/{define-config-ChOOV2QZ.d.mts → define-config-sxBscJ3M.d.mts} +1 -1
- package/dist/shared/{error-C0TrL0_H.mjs → error-B68YLzl3.mjs} +1 -1
- package/dist/shared/{load-config-BDGEgD4M.mjs → load-config-BvPPEM7l.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-DGbe3BlX.mjs → normalize-string-or-regex-BpXHYeN4.mjs} +1 -1
- package/dist/shared/{parse-yrGA-p2H.mjs → parse-CTgsjpo8.mjs} +2 -2
- package/dist/shared/{prompt-DYnaB1Nb.mjs → prompt-B1Yc1NPt.mjs} +5 -5
- package/dist/shared/{resolve-tsconfig-D3YLh9ff.mjs → resolve-tsconfig-BkhP9bkX.mjs} +2 -2
- package/dist/shared/{rolldown-Bkyb2CgX.mjs → rolldown-Brph2NSU.mjs} +1 -1
- package/dist/shared/{rolldown-build-abS241_6.mjs → rolldown-build-DR0wzp0V.mjs} +24 -56
- package/dist/shared/{transform-C-XSNVrd.d.mts → transform-CEmFsvJW.d.mts} +1 -1
- package/dist/shared/{watch-eT_pxdfY.mjs → watch-FrHSqg24.mjs} +4 -4
- package/dist/utils-index.d.mts +3 -3
- package/dist/utils-index.mjs +6 -6
- package/package.json +23 -23
package/dist/cli.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import { C as version, S as description } from "./shared/bindingify-input-options-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-FrHSqg24.mjs";
|
|
2
|
+
import { C as version, S as description } from "./shared/bindingify-input-options-CzVhGygm.mjs";
|
|
3
3
|
import { t as arraify } from "./shared/misc-CoQm4NHO.mjs";
|
|
4
|
-
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-
|
|
5
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
6
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
4
|
+
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-DR0wzp0V.mjs";
|
|
5
|
+
import { t as rolldown } from "./shared/rolldown-Brph2NSU.mjs";
|
|
6
|
+
import { t as loadConfig } from "./shared/load-config-BvPPEM7l.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import
|
|
8
|
+
import g$1 from "node:process";
|
|
9
9
|
import { performance } from "node:perf_hooks";
|
|
10
10
|
//#region ../../node_modules/.pnpm/cac@7.0.0/node_modules/cac/dist/index.js
|
|
11
11
|
function toArr(any) {
|
|
@@ -679,7 +679,7 @@ function camelCaseToKebabCase(str) {
|
|
|
679
679
|
}
|
|
680
680
|
//#endregion
|
|
681
681
|
//#region src/cli/arguments/normalize.ts
|
|
682
|
-
const reservedKeys = new Set([
|
|
682
|
+
const reservedKeys = /* @__PURE__ */ new Set([
|
|
683
683
|
"help",
|
|
684
684
|
"version",
|
|
685
685
|
"config",
|
|
@@ -736,8 +736,7 @@ const options = Object.fromEntries(Object.entries(schemaInfo).filter(([_key, inf
|
|
|
736
736
|
};
|
|
737
737
|
if (config?.abbreviation) result.short = config.abbreviation;
|
|
738
738
|
if (config?.hint) result.hint = config.hint;
|
|
739
|
-
|
|
740
|
-
return [config?.reverse ? `no-${kebabKey}` : kebabKey, result];
|
|
739
|
+
return [config?.reverse ? `no-${key}` : key, result];
|
|
741
740
|
}));
|
|
742
741
|
const knownKeys = new Set(Object.keys(schemaInfo));
|
|
743
742
|
for (const key of Object.keys(schemaInfo)) {
|
|
@@ -746,6 +745,18 @@ for (const key of Object.keys(schemaInfo)) {
|
|
|
746
745
|
}
|
|
747
746
|
const shortAliases = /* @__PURE__ */ new Set();
|
|
748
747
|
for (const config of Object.values(alias)) if (config?.abbreviation) shortAliases.add(config.abbreviation);
|
|
748
|
+
function kebabToCamelCase(input) {
|
|
749
|
+
return input.replaceAll(/([a-z])-([a-z])/g, (_, p1, p2) => {
|
|
750
|
+
return p1 + p2.toUpperCase();
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
function camelizeNestedKeys(value) {
|
|
754
|
+
const result = {};
|
|
755
|
+
for (const [key, nestedValue] of Object.entries(value)) if (Array.isArray(nestedValue)) result[kebabToCamelCase(key)] = nestedValue;
|
|
756
|
+
else if (nestedValue && typeof nestedValue === "object") result[kebabToCamelCase(key)] = camelizeNestedKeys(nestedValue);
|
|
757
|
+
else result[kebabToCamelCase(key)] = nestedValue;
|
|
758
|
+
return result;
|
|
759
|
+
}
|
|
749
760
|
function parseCliArguments() {
|
|
750
761
|
const cli = cac("rolldown");
|
|
751
762
|
for (const [key, info] of Object.entries(schemaInfo)) {
|
|
@@ -790,6 +801,7 @@ function parseCliArguments() {
|
|
|
790
801
|
const single = unknownKeys.length === 1;
|
|
791
802
|
logger.warn(`Option \`${unknownKeys.join(",")}\` ${single ? "is" : "are"} unrecognized. We will ignore ${single ? "this" : "those"} option${single ? "" : "s"}.`);
|
|
792
803
|
}
|
|
804
|
+
parsedOptions = camelizeNestedKeys(parsedOptions);
|
|
793
805
|
const rawArgs = { ...parsedOptions };
|
|
794
806
|
for (const key of unknownKeys) delete parsedOptions[key];
|
|
795
807
|
for (const [key, value] of Object.entries(parsedOptions)) {
|
|
@@ -847,7 +859,7 @@ function getClearScreenFunction(options) {
|
|
|
847
859
|
};
|
|
848
860
|
}
|
|
849
861
|
//#endregion
|
|
850
|
-
//#region \0@oxc-project+runtime@0.
|
|
862
|
+
//#region \0@oxc-project+runtime@0.137.0/helpers/esm/usingCtx.js
|
|
851
863
|
function _usingCtx() {
|
|
852
864
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
853
865
|
var n = Error();
|
|
@@ -1121,7 +1133,6 @@ function generateHelpText() {
|
|
|
1121
1133
|
return a.localeCompare(b);
|
|
1122
1134
|
}).map(([option, { type, short, hint, description }]) => {
|
|
1123
1135
|
let optionStr = ` --${option} `;
|
|
1124
|
-
option = camelCaseToKebabCase(option);
|
|
1125
1136
|
if (short) optionStr += `-${short}, `;
|
|
1126
1137
|
if (type === "string") optionStr += `<${hint ?? option}>`;
|
|
1127
1138
|
if (description && description.length > 0) description = description[0].toUpperCase() + description.slice(1);
|
|
@@ -1155,14 +1166,14 @@ function checkNodeVersion(nodeVersion) {
|
|
|
1155
1166
|
}
|
|
1156
1167
|
//#endregion
|
|
1157
1168
|
//#region src/cli/index.ts
|
|
1158
|
-
if (!checkNodeVersion(
|
|
1169
|
+
if (!checkNodeVersion(g$1.versions.node)) logger.warn(`You are using Node.js ${g$1.versions.node}. Rolldown requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.`);
|
|
1159
1170
|
async function main() {
|
|
1160
1171
|
const { rawArgs, ...cliOptions } = parseCliArguments();
|
|
1161
1172
|
if (cliOptions.environment) {
|
|
1162
1173
|
const environment = Array.isArray(cliOptions.environment) ? cliOptions.environment : [cliOptions.environment];
|
|
1163
1174
|
for (const argument of environment) for (const pair of argument.split(",")) {
|
|
1164
1175
|
const [key, ...value] = pair.split(":");
|
|
1165
|
-
|
|
1176
|
+
g$1.env[key] = value.length === 0 ? String(true) : value.join(":");
|
|
1166
1177
|
}
|
|
1167
1178
|
}
|
|
1168
1179
|
if (cliOptions.help) {
|
|
@@ -1185,7 +1196,7 @@ async function main() {
|
|
|
1185
1196
|
}
|
|
1186
1197
|
main().catch((err) => {
|
|
1187
1198
|
logger.error(err);
|
|
1188
|
-
|
|
1199
|
+
g$1.exit(1);
|
|
1189
1200
|
});
|
|
1190
1201
|
//#endregion
|
|
1191
1202
|
export {};
|
package/dist/config.d.mts
CHANGED
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as VERSION } from "./shared/bindingify-input-options-
|
|
1
|
+
import { x as VERSION } from "./shared/bindingify-input-options-CzVhGygm.mjs";
|
|
2
2
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
3
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
3
|
+
import { t as loadConfig } from "./shared/load-config-BvPPEM7l.mjs";
|
|
4
4
|
export { VERSION, defineConfig, loadConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-
|
|
2
|
-
import { Jt as RolldownOutput, P as BuiltinPlugin, Ut as StringOrRegExp, Xt as freeExternalMemory, Z as defineParallelPlugin, ct as NormalizedOutputOptions, l as InputOptions, zt as OutputOptions } from "./shared/define-config-
|
|
3
|
-
import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-
|
|
4
|
-
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin,
|
|
1
|
+
import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-B1q9aYT-.mjs";
|
|
2
|
+
import { Jt as RolldownOutput, P as BuiltinPlugin, Ut as StringOrRegExp, Xt as freeExternalMemory, Z as defineParallelPlugin, ct as NormalizedOutputOptions, l as InputOptions, zt as OutputOptions } from "./shared/define-config-sxBscJ3M.mjs";
|
|
3
|
+
import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-CEmFsvJW.mjs";
|
|
4
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-awZ1VNvg.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/api/dev/dev-options.d.ts
|
|
7
7
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -9,6 +9,7 @@ type DevOnHmrUpdates = (result: Error | {
|
|
|
9
9
|
changedFiles: string[];
|
|
10
10
|
}) => void | Promise<void>;
|
|
11
11
|
type DevOnOutput = (result: Error | RolldownOutput) => void | Promise<void>;
|
|
12
|
+
type DevOnAdditionalAssets = (output: RolldownOutput) => void | Promise<void>;
|
|
12
13
|
interface DevWatchOptions {
|
|
13
14
|
/**
|
|
14
15
|
* If `true`, files are not written to disk.
|
|
@@ -69,6 +70,15 @@ interface DevOptions {
|
|
|
69
70
|
onHmrUpdates?: DevOnHmrUpdates;
|
|
70
71
|
onOutput?: DevOnOutput;
|
|
71
72
|
/**
|
|
73
|
+
* Called with assets emitted while generating an HMR patch or compiling a
|
|
74
|
+
* lazy entry (e.g. an image newly imported by the changed/lazy module).
|
|
75
|
+
*
|
|
76
|
+
* These never go through {@link onOutput}, so a consumer that serves built
|
|
77
|
+
* files (e.g. Vite's bundled dev server) must register this to receive them
|
|
78
|
+
* and write them to its in-memory file store before the client requests them.
|
|
79
|
+
*/
|
|
80
|
+
onAdditionalAssets?: DevOnAdditionalAssets;
|
|
81
|
+
/**
|
|
72
82
|
* Strategy for triggering rebuilds after HMR updates.
|
|
73
83
|
* - `'always'`: Always trigger a rebuild after HMR updates
|
|
74
84
|
* - `'auto'`: Trigger rebuild only if HMR updates contain full reload updates
|
|
@@ -267,4 +277,4 @@ type TsconfigRawOptions = BindingTsconfigRawOptions;
|
|
|
267
277
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
268
278
|
type TsconfigCompilerOptions = BindingTsconfigCompilerOptions;
|
|
269
279
|
//#endregion
|
|
270
|
-
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, TransformOptions, TransformResult, TsconfigCache, TsconfigCompilerOptions, TsconfigRawOptions, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin,
|
|
280
|
+
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, TransformOptions, TransformResult, TsconfigCache, TsconfigCompilerOptions, TsconfigRawOptions, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWebWorkerPostPlugin };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./shared/binding-
|
|
2
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-
|
|
3
|
-
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-
|
|
4
|
-
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-
|
|
5
|
-
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-
|
|
6
|
-
import { n as parseSync$1, t as parse$1 } from "./shared/parse-
|
|
7
|
-
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin,
|
|
8
|
-
import { a as minify$1, i as transformSync$1, n as resolveTsconfig, o as minifySync$1, r as transform$1, t as TsconfigCache$1 } from "./shared/resolve-tsconfig-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-Dh6LYCIB.mjs";
|
|
2
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-BpXHYeN4.mjs";
|
|
3
|
+
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-CzVhGygm.mjs";
|
|
4
|
+
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-DR0wzp0V.mjs";
|
|
5
|
+
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-B68YLzl3.mjs";
|
|
6
|
+
import { n as parseSync$1, t as parse$1 } from "./shared/parse-CTgsjpo8.mjs";
|
|
7
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-688OwP2q.mjs";
|
|
8
|
+
import { a as minify$1, i as transformSync$1, n as resolveTsconfig, o as minifySync$1, r as transform$1, t as TsconfigCache$1 } from "./shared/resolve-tsconfig-BkhP9bkX.mjs";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
10
10
|
//#region src/api/dev/dev-engine.ts
|
|
11
11
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
@@ -29,15 +29,20 @@ var DevEngine = class DevEngine {
|
|
|
29
29
|
});
|
|
30
30
|
} : void 0;
|
|
31
31
|
const userOnOutput = devOptions.onOutput;
|
|
32
|
+
const bindingOnOutput = userOnOutput ? function(rawResult) {
|
|
33
|
+
const result = normalizeBindingResult(rawResult);
|
|
34
|
+
if (result instanceof Error) {
|
|
35
|
+
userOnOutput(result);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
userOnOutput(transformToRollupOutput(result));
|
|
39
|
+
} : void 0;
|
|
40
|
+
const userOnAdditionalAssets = devOptions.onAdditionalAssets;
|
|
32
41
|
const bindingDevOptions = {
|
|
33
42
|
onHmrUpdates: bindingOnHmrUpdates,
|
|
34
|
-
onOutput:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
userOnOutput(result);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
userOnOutput(transformToRollupOutput(result));
|
|
43
|
+
onOutput: bindingOnOutput,
|
|
44
|
+
onAdditionalAssets: userOnAdditionalAssets ? function(output) {
|
|
45
|
+
userOnAdditionalAssets(transformToRollupOutput(output));
|
|
41
46
|
} : void 0,
|
|
42
47
|
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? import_binding.BindingRebuildStrategy.Always : devOptions.rebuildStrategy === "auto" ? import_binding.BindingRebuildStrategy.Auto : import_binding.BindingRebuildStrategy.Never : void 0,
|
|
43
48
|
watch: devOptions.watch && {
|
|
@@ -322,4 +327,4 @@ var ResolverFactory = import_binding.ResolverFactory;
|
|
|
322
327
|
var isolatedDeclaration = import_binding.isolatedDeclaration;
|
|
323
328
|
var isolatedDeclarationSync = import_binding.isolatedDeclarationSync;
|
|
324
329
|
var moduleRunnerTransform = import_binding.moduleRunnerTransform;
|
|
325
|
-
export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin,
|
|
330
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWebWorkerPostPlugin };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as withFilter } from "./shared/define-config-
|
|
1
|
+
import { N as withFilter } from "./shared/define-config-sxBscJ3M.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.1/node_modules/@rolldown/pluginutils/dist/filter/index.d.mts
|
|
4
4
|
//#region src/filter/composable-filters.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-BSNejiLS.mjs";
|
|
2
|
-
import { z as PreRenderedChunk } from "./shared/binding-
|
|
3
|
-
import { $ as PluginContextMeta, A as RolldownPluginOption, At as CodeSplittingGroup, B as OutputBundle, Bt as PreRenderedAsset, C as ParallelPluginHooks, Ct as build, D as ResolveIdResult, Dt as BuiltinModuleTag, E as ResolveIdExtraOptions, Et as AdvancedChunksOptions, F as RUNTIME_MODULE_ID, Ft as GeneratedCodePreset, G as EmittedFile, Gt as OutputChunk, H as TransformPluginContext, Ht as PartialNull, I as VERSION, It as GlobalsFunction, J as PluginContext, Jt as RolldownOutput, K as EmittedPrebuiltChunk, Kt as RenderedChunk, L as BundleError, Lt as MinifyOptions, M as TransformResult, Mt as CodeSplittingOptions, Nt as CommentsOptions, O as ResolvedId, Ot as ChunkFileNamesFunction, Pt as GeneratedCodeOptions, Q as MinimalPluginContext, Qt as SourcemapIgnoreListOption, R as ExistingRawSourceMap, Rt as ModuleFormat, S as ObjectHook, St as BuildOptions, T as Plugin, Tt as AdvancedChunksGroup, U as EmittedAsset, V as TreeshakingOptions, W as EmittedChunk, Wt as OutputAsset, X as DefineParallelPluginResult, Y as PluginContextResolveOptions, Yt as SourceMap, Zt as ModuleInfo, _ as HookFilterExtension, _t as RolldownWatcherEvent, a as ChunkOptimizationOptions, at as RolldownFileStats, b as ModuleOptions, bt as rolldown, c as InputOption, ct as NormalizedOutputOptions, d as OptimizationOptions, dt as ChecksOptions, et as GeneralHookFilter, f as WatcherFileWatcherOptions, ft as LoggingFunction, g as FunctionPluginHooks, gt as RolldownWatcher, h as CustomPluginOptions, ht as watch, i as RolldownOptions, it as RolldownDirectoryEntry, j as SourceDescription, jt as CodeSplittingNameFunction, k as RolldownPlugin, kt as ChunkingContext, l as InputOptions, lt as NormalizedInputOptions, m as AsyncPluginHooks, mt as RolldownMagicString, n as RolldownOptionsFunction, nt as ModuleTypeFilter, o as ExternalOption, ot as RolldownFsModule, p as WatcherOptions, pt as WarningHandlerWithDefault, q as GetModuleInfo, qt as RenderedModule, r as defineConfig, rt as BufferEncoding, s as ExternalOptionFunction, st as InternalModuleFormat, t as ConfigExport, tt as HookFilter, u as ModuleTypes, ut as TransformOptions, v as ImportKind, vt as RolldownWatcherWatcherEventMap, w as PartialResolvedId, wt as AddonFunction, x as ModuleType, xt as RolldownBuild, y as LoadResult, yt as WatchOptions, z as SourceMapInput, zt as OutputOptions } from "./shared/define-config-
|
|
2
|
+
import { z as PreRenderedChunk } from "./shared/binding-B1q9aYT-.mjs";
|
|
3
|
+
import { $ as PluginContextMeta, A as RolldownPluginOption, At as CodeSplittingGroup, B as OutputBundle, Bt as PreRenderedAsset, C as ParallelPluginHooks, Ct as build, D as ResolveIdResult, Dt as BuiltinModuleTag, E as ResolveIdExtraOptions, Et as AdvancedChunksOptions, F as RUNTIME_MODULE_ID, Ft as GeneratedCodePreset, G as EmittedFile, Gt as OutputChunk, H as TransformPluginContext, Ht as PartialNull, I as VERSION, It as GlobalsFunction, J as PluginContext, Jt as RolldownOutput, K as EmittedPrebuiltChunk, Kt as RenderedChunk, L as BundleError, Lt as MinifyOptions, M as TransformResult, Mt as CodeSplittingOptions, Nt as CommentsOptions, O as ResolvedId, Ot as ChunkFileNamesFunction, Pt as GeneratedCodeOptions, Q as MinimalPluginContext, Qt as SourcemapIgnoreListOption, R as ExistingRawSourceMap, Rt as ModuleFormat, S as ObjectHook, St as BuildOptions, T as Plugin, Tt as AdvancedChunksGroup, U as EmittedAsset, V as TreeshakingOptions, W as EmittedChunk, Wt as OutputAsset, X as DefineParallelPluginResult, Y as PluginContextResolveOptions, Yt as SourceMap, Zt as ModuleInfo, _ as HookFilterExtension, _t as RolldownWatcherEvent, a as ChunkOptimizationOptions, at as RolldownFileStats, b as ModuleOptions, bt as rolldown, c as InputOption, ct as NormalizedOutputOptions, d as OptimizationOptions, dt as ChecksOptions, et as GeneralHookFilter, f as WatcherFileWatcherOptions, ft as LoggingFunction, g as FunctionPluginHooks, gt as RolldownWatcher, h as CustomPluginOptions, ht as watch, i as RolldownOptions, it as RolldownDirectoryEntry, j as SourceDescription, jt as CodeSplittingNameFunction, k as RolldownPlugin, kt as ChunkingContext, l as InputOptions, lt as NormalizedInputOptions, m as AsyncPluginHooks, mt as RolldownMagicString, n as RolldownOptionsFunction, nt as ModuleTypeFilter, o as ExternalOption, ot as RolldownFsModule, p as WatcherOptions, pt as WarningHandlerWithDefault, q as GetModuleInfo, qt as RenderedModule, r as defineConfig, rt as BufferEncoding, s as ExternalOptionFunction, st as InternalModuleFormat, t as ConfigExport, tt as HookFilter, u as ModuleTypes, ut as TransformOptions, v as ImportKind, vt as RolldownWatcherWatcherEventMap, w as PartialResolvedId, wt as AddonFunction, x as ModuleType, xt as RolldownBuild, y as LoadResult, yt as WatchOptions, z as SourceMapInput, zt as OutputOptions } from "./shared/define-config-sxBscJ3M.mjs";
|
|
4
4
|
export { type AddonFunction, type AdvancedChunksGroup, type AdvancedChunksOptions, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, type BuiltinModuleTag, type BundleError, type ChecksOptions, type ChunkFileNamesFunction, type ChunkOptimizationOptions, type ChunkingContext, type CodeSplittingGroup, type CodeSplittingNameFunction, type CodeSplittingOptions, type CommentsOptions, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedChunk, type EmittedFile, type EmittedPrebuiltChunk, type ExistingRawSourceMap, type ExternalOption, type ExternalOptionFunction, type FunctionPluginHooks, type GeneralHookFilter, type GeneratedCodeOptions, type GeneratedCodePreset, 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, 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 PluginContextResolveOptions, type PreRenderedAsset, type PreRenderedChunk, RUNTIME_MODULE_ID, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownError, type RolldownError as RollupError, type RolldownFileStats, type RolldownFsModule, type RolldownLog, type RolldownLog as RollupLog, type RolldownLogWithString, type RolldownLogWithString as RollupLogWithString, RolldownMagicString, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RolldownWatcherWatcherEventMap, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformOptions, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherFileWatcherOptions, type WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./shared/binding-
|
|
2
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
3
|
-
import {
|
|
4
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-Dh6LYCIB.mjs";
|
|
2
|
+
import { n as onExit, t as watch } from "./shared/watch-FrHSqg24.mjs";
|
|
3
|
+
import { b as RUNTIME_MODULE_ID, r as RolldownMagicString, x as VERSION } from "./shared/bindingify-input-options-CzVhGygm.mjs";
|
|
4
|
+
import { t as rolldown } from "./shared/rolldown-Brph2NSU.mjs";
|
|
5
5
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
6
6
|
import { isMainThread } from "node:worker_threads";
|
|
7
7
|
//#region src/setup.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./shared/binding-
|
|
2
|
-
import {
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-Dh6LYCIB.mjs";
|
|
2
|
+
import { i as PluginContextData, n as bindingifyPlugin } from "./shared/bindingify-input-options-CzVhGygm.mjs";
|
|
3
3
|
import { parentPort, workerData } from "node:worker_threads";
|
|
4
4
|
//#region src/parallel-plugin-worker.ts
|
|
5
5
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Plugin, Vt as MaybePromise } from "./shared/define-config-
|
|
1
|
+
import { T as Plugin, Vt as MaybePromise } from "./shared/define-config-sxBscJ3M.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
4
4
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-aMKUxRpj.mjs";
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-CTgsjpo8.mjs";
|
|
3
3
|
//#region src/parse-ast-index.ts
|
|
4
4
|
function wrap(result, filename, sourceText) {
|
|
5
5
|
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as BindingReplacePluginConfig } from "./shared/binding-
|
|
2
|
-
import { P as BuiltinPlugin } from "./shared/define-config-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { m as BindingReplacePluginConfig } from "./shared/binding-B1q9aYT-.mjs";
|
|
2
|
+
import { P as BuiltinPlugin } from "./shared/define-config-sxBscJ3M.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-awZ1VNvg.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
6
6
|
/**
|
package/dist/plugins-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-BpXHYeN4.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-688OwP2q.mjs";
|
|
3
3
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
4
|
/**
|
|
5
5
|
* Replaces targeted strings in files while bundling.
|
|
@@ -982,94 +982,6 @@ interface PluginsOptions {
|
|
|
982
982
|
styledComponents?: StyledComponentsOptions;
|
|
983
983
|
taggedTemplateEscape?: boolean;
|
|
984
984
|
}
|
|
985
|
-
/** Dynamic gating for {@link ReactCompilerOptions#dynamicGating}. */
|
|
986
|
-
interface ReactCompilerDynamicGating {
|
|
987
|
-
/** Module the gating import comes from. */
|
|
988
|
-
source: string;
|
|
989
|
-
}
|
|
990
|
-
/** Static gating for {@link ReactCompilerOptions#gating}. */
|
|
991
|
-
interface ReactCompilerGating {
|
|
992
|
-
/** Module the gating import comes from. */
|
|
993
|
-
source: string;
|
|
994
|
-
/** Imported specifier used as the gate. */
|
|
995
|
-
importSpecifierName: string;
|
|
996
|
-
}
|
|
997
|
-
/**
|
|
998
|
-
* Options for the experimental [React Compiler](https://github.com/facebook/react/pull/36173).
|
|
999
|
-
*
|
|
1000
|
-
* Mirrors the compiler's `PluginOptions`. The deep `environment` configuration
|
|
1001
|
-
* (inference / validation flags) is not surfaced here.
|
|
1002
|
-
*
|
|
1003
|
-
* @see {@link TransformOptions#reactCompiler}
|
|
1004
|
-
*/
|
|
1005
|
-
interface ReactCompilerOptions {
|
|
1006
|
-
/**
|
|
1007
|
-
* Which functions to compile.
|
|
1008
|
-
*
|
|
1009
|
-
* @default 'infer'
|
|
1010
|
-
*/
|
|
1011
|
-
compilationMode?: 'infer' | 'syntax' | 'annotation' | 'all';
|
|
1012
|
-
/**
|
|
1013
|
-
* What to do when a function cannot be compiled.
|
|
1014
|
-
*
|
|
1015
|
-
* @default 'none'
|
|
1016
|
-
*/
|
|
1017
|
-
panicThreshold?: 'none' | 'critical_errors' | 'all_errors';
|
|
1018
|
-
/**
|
|
1019
|
-
* React runtime version target. `17` and `18` require the
|
|
1020
|
-
* `react-compiler-runtime` package; `19` ships the runtime in `react`.
|
|
1021
|
-
*
|
|
1022
|
-
* @default '19'
|
|
1023
|
-
*/
|
|
1024
|
-
target?: '17' | '18' | '19';
|
|
1025
|
-
/**
|
|
1026
|
-
* Analyze and report diagnostics only; emit no transformed code.
|
|
1027
|
-
*
|
|
1028
|
-
* @default false
|
|
1029
|
-
*/
|
|
1030
|
-
noEmit?: boolean;
|
|
1031
|
-
/**
|
|
1032
|
-
* Compiler output mode.
|
|
1033
|
-
*
|
|
1034
|
-
* @default undefined
|
|
1035
|
-
*/
|
|
1036
|
-
outputMode?: 'client' | 'ssr' | 'lint';
|
|
1037
|
-
/**
|
|
1038
|
-
* Compile even functions marked with the `"use no memo"` / `"use no forget"`
|
|
1039
|
-
* opt-out directives.
|
|
1040
|
-
*
|
|
1041
|
-
* @default false
|
|
1042
|
-
*/
|
|
1043
|
-
ignoreUseNoForget?: boolean;
|
|
1044
|
-
/**
|
|
1045
|
-
* Treat Flow suppression comments as opt-outs.
|
|
1046
|
-
*
|
|
1047
|
-
* @default true
|
|
1048
|
-
*/
|
|
1049
|
-
flowSuppressions?: boolean;
|
|
1050
|
-
/**
|
|
1051
|
-
* Enable `react-native-reanimated` support.
|
|
1052
|
-
*
|
|
1053
|
-
* @default false
|
|
1054
|
-
*/
|
|
1055
|
-
enableReanimated?: boolean;
|
|
1056
|
-
/**
|
|
1057
|
-
* Development mode (extra validation / instrumentation).
|
|
1058
|
-
*
|
|
1059
|
-
* @default false
|
|
1060
|
-
*/
|
|
1061
|
-
isDev?: boolean;
|
|
1062
|
-
/** Source file name, used for the fast-refresh hash and in diagnostics. */
|
|
1063
|
-
filename?: string;
|
|
1064
|
-
/** ESLint rules whose suppressions opt a function out of compilation. */
|
|
1065
|
-
eslintSuppressionRules?: Array<string>;
|
|
1066
|
-
/** Extra directives that opt a function out of compilation. */
|
|
1067
|
-
customOptOutDirectives?: Array<string>;
|
|
1068
|
-
/** Also emit a gated (feature-flagged) version of each compiled function. */
|
|
1069
|
-
gating?: ReactCompilerGating;
|
|
1070
|
-
/** Dynamically-gated compilation. */
|
|
1071
|
-
dynamicGating?: ReactCompilerDynamicGating;
|
|
1072
|
-
}
|
|
1073
985
|
interface ReactRefreshOptions {
|
|
1074
986
|
/**
|
|
1075
987
|
* Specify the identifier of the refresh registration variable.
|
|
@@ -1116,7 +1028,10 @@ interface StyledComponentsOptions {
|
|
|
1116
1028
|
* Transpiles styled-components tagged template literals to a smaller representation
|
|
1117
1029
|
* than what Babel normally creates, helping to reduce bundle size.
|
|
1118
1030
|
*
|
|
1119
|
-
*
|
|
1031
|
+
* Disabled by default because Oxc does not down-level template literals, so this
|
|
1032
|
+
* transform only increases output size.
|
|
1033
|
+
*
|
|
1034
|
+
* @default false
|
|
1120
1035
|
*/
|
|
1121
1036
|
transpileTemplateLiterals?: boolean;
|
|
1122
1037
|
/**
|
|
@@ -1166,6 +1081,13 @@ interface StyledComponentsOptions {
|
|
|
1166
1081
|
/**
|
|
1167
1082
|
* Options for transforming a JavaScript or TypeScript file.
|
|
1168
1083
|
*
|
|
1084
|
+
* Options are listed in evaluation order: the source is parsed (`lang`,
|
|
1085
|
+
* `sourceType`), declarations are emitted (`typescript.declaration`), then
|
|
1086
|
+
* transforms run (`typescript`, `decorator`, `plugins`,
|
|
1087
|
+
* `jsx`, `target`), followed by the `inject` and `define` plugins, and
|
|
1088
|
+
* finally codegen (`sourcemap`). `helpers` configures the runtime helpers
|
|
1089
|
+
* the transforms emit.
|
|
1090
|
+
*
|
|
1169
1091
|
* @see {@link transform}
|
|
1170
1092
|
*/
|
|
1171
1093
|
interface TransformOptions {
|
|
@@ -1178,23 +1100,23 @@ interface TransformOptions {
|
|
|
1178
1100
|
* options.
|
|
1179
1101
|
*/
|
|
1180
1102
|
cwd?: string;
|
|
1181
|
-
/**
|
|
1182
|
-
* Enable source map generation.
|
|
1183
|
-
*
|
|
1184
|
-
* When `true`, the `sourceMap` field of transform result objects will be populated.
|
|
1185
|
-
*
|
|
1186
|
-
* @default false
|
|
1187
|
-
*
|
|
1188
|
-
* @see {@link SourceMap}
|
|
1189
|
-
*/
|
|
1190
|
-
sourcemap?: boolean;
|
|
1191
1103
|
/** Set assumptions in order to produce smaller output. */
|
|
1192
1104
|
assumptions?: CompilerAssumptions;
|
|
1193
1105
|
/**
|
|
1194
1106
|
* Configure how TypeScript is transformed.
|
|
1107
|
+
*
|
|
1108
|
+
* `typescript.declaration` is evaluated before all transforms.
|
|
1109
|
+
*
|
|
1195
1110
|
* @see {@link https://oxc.rs/docs/guide/usage/transformer/typescript}
|
|
1196
1111
|
*/
|
|
1197
1112
|
typescript?: TypeScriptOptions;
|
|
1113
|
+
/** Decorator plugin */
|
|
1114
|
+
decorator?: DecoratorOptions;
|
|
1115
|
+
/**
|
|
1116
|
+
* Third-party plugins to use.
|
|
1117
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins}
|
|
1118
|
+
*/
|
|
1119
|
+
plugins?: PluginsOptions;
|
|
1198
1120
|
/**
|
|
1199
1121
|
* Configure how TSX and JSX are transformed.
|
|
1200
1122
|
* @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
|
|
@@ -1217,31 +1139,32 @@ interface TransformOptions {
|
|
|
1217
1139
|
target?: string | Array<string>;
|
|
1218
1140
|
/** Behaviour for runtime helpers. */
|
|
1219
1141
|
helpers?: Helpers;
|
|
1220
|
-
/**
|
|
1221
|
-
* Define Plugin
|
|
1222
|
-
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
|
|
1223
|
-
*/
|
|
1224
|
-
define?: Record<string, string>;
|
|
1225
1142
|
/**
|
|
1226
1143
|
* Inject Plugin
|
|
1144
|
+
*
|
|
1145
|
+
* Runs after all transforms.
|
|
1146
|
+
*
|
|
1227
1147
|
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#inject}
|
|
1228
1148
|
*/
|
|
1229
1149
|
inject?: Record<string, string | [string, string]>;
|
|
1230
|
-
/** Decorator plugin */
|
|
1231
|
-
decorator?: DecoratorOptions;
|
|
1232
1150
|
/**
|
|
1233
|
-
*
|
|
1151
|
+
* Define Plugin
|
|
1152
|
+
*
|
|
1153
|
+
* Runs after the inject plugin.
|
|
1234
1154
|
*
|
|
1235
|
-
*
|
|
1236
|
-
* given options; `false` or omitted disables it. When enabled, the compiler
|
|
1237
|
-
* runs as the first transform and memoizes React components and hooks.
|
|
1155
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
|
|
1238
1156
|
*/
|
|
1239
|
-
|
|
1157
|
+
define?: Record<string, string>;
|
|
1240
1158
|
/**
|
|
1241
|
-
*
|
|
1242
|
-
*
|
|
1159
|
+
* Enable source map generation.
|
|
1160
|
+
*
|
|
1161
|
+
* When `true`, the `sourceMap` field of transform result objects will be populated.
|
|
1162
|
+
*
|
|
1163
|
+
* @default false
|
|
1164
|
+
*
|
|
1165
|
+
* @see {@link SourceMap}
|
|
1243
1166
|
*/
|
|
1244
|
-
|
|
1167
|
+
sourcemap?: boolean;
|
|
1245
1168
|
}
|
|
1246
1169
|
interface TypeScriptOptions {
|
|
1247
1170
|
jsxPragma?: string;
|
|
@@ -1535,7 +1458,7 @@ declare class TsconfigCache {
|
|
|
1535
1458
|
/** Get the number of cached entries. */
|
|
1536
1459
|
size(): number;
|
|
1537
1460
|
}
|
|
1538
|
-
type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-
|
|
1461
|
+
type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-web-worker-post' | 'builtin:oxc-runtime';
|
|
1539
1462
|
interface BindingBundleAnalyzerPluginConfig {
|
|
1540
1463
|
/** Output filename for the bundle analysis data (default: "analyze-data.json") */
|
|
1541
1464
|
fileName?: string;
|
|
@@ -1543,7 +1466,16 @@ interface BindingBundleAnalyzerPluginConfig {
|
|
|
1543
1466
|
format?: 'json' | 'md';
|
|
1544
1467
|
}
|
|
1545
1468
|
interface BindingBundleState {
|
|
1546
|
-
|
|
1469
|
+
lastBuildErrored: boolean;
|
|
1470
|
+
/**
|
|
1471
|
+
* The stage of the last incremental failure, when `last_build_errored`
|
|
1472
|
+
* is true and the engine is in an incremental-failure state. Absent on
|
|
1473
|
+
* success and for an initial full-build failure (use
|
|
1474
|
+
* `last_build_errored` to detect that). The consumer can force a full
|
|
1475
|
+
* rebuild on the next page load when this is `Hmr`. See
|
|
1476
|
+
* `internal-docs/dev-engine/implementation.md` §12.
|
|
1477
|
+
*/
|
|
1478
|
+
lastErrorStage?: BindingErrorStage;
|
|
1547
1479
|
hasStaleOutput: boolean;
|
|
1548
1480
|
}
|
|
1549
1481
|
interface BindingClientHmrUpdate {
|
|
@@ -1705,6 +1637,16 @@ type BindingError = {
|
|
|
1705
1637
|
type: 'NativeError';
|
|
1706
1638
|
field0: NativeError;
|
|
1707
1639
|
};
|
|
1640
|
+
/**
|
|
1641
|
+
* Which stage of an incremental dev build produced the last error.
|
|
1642
|
+
*
|
|
1643
|
+
* Mirrors `rolldown_dev::ErrorStage`. Surfaced on
|
|
1644
|
+
* [`crate::binding_dev_engine::BindingBundleState`] so the consumer can
|
|
1645
|
+
* treat an `Hmr`-stage failure as recoverable by forcing a full rebuild
|
|
1646
|
+
* on the next page load (HMR generation may itself be buggy). See
|
|
1647
|
+
* `internal-docs/dev-engine/implementation.md` §12.
|
|
1648
|
+
*/
|
|
1649
|
+
type BindingErrorStage = 'Hmr' | 'Rebuild';
|
|
1708
1650
|
interface BindingEsmExternalRequirePluginConfig {
|
|
1709
1651
|
external: Array<BindingStringOrRegex>;
|
|
1710
1652
|
skipDuplicateCheck?: boolean;
|
|
@@ -1759,13 +1701,6 @@ interface BindingMagicStringOptions {
|
|
|
1759
1701
|
indentExclusionRanges?: Array<Array<number>> | Array<number>;
|
|
1760
1702
|
ignoreList?: boolean;
|
|
1761
1703
|
}
|
|
1762
|
-
interface BindingModulePreloadOptions {
|
|
1763
|
-
polyfill: boolean;
|
|
1764
|
-
resolveDependencies?: (filename: string, deps: string[], context: {
|
|
1765
|
-
hostId: string;
|
|
1766
|
-
hostType: 'html' | 'js';
|
|
1767
|
-
}) => string[];
|
|
1768
|
-
}
|
|
1769
1704
|
interface BindingModules {
|
|
1770
1705
|
values: Array<BindingRenderedModule>;
|
|
1771
1706
|
keys: Array<string>;
|
|
@@ -1794,16 +1729,6 @@ declare enum BindingRebuildStrategy {
|
|
|
1794
1729
|
Auto = 1,
|
|
1795
1730
|
Never = 2
|
|
1796
1731
|
}
|
|
1797
|
-
interface BindingRenderBuiltUrlConfig {
|
|
1798
|
-
ssr: boolean;
|
|
1799
|
-
type: 'asset' | 'public';
|
|
1800
|
-
hostId: string;
|
|
1801
|
-
hostType: 'js' | 'css' | 'html';
|
|
1802
|
-
}
|
|
1803
|
-
interface BindingRenderBuiltUrlRet {
|
|
1804
|
-
relative?: boolean;
|
|
1805
|
-
runtime?: string;
|
|
1806
|
-
}
|
|
1807
1732
|
interface BindingReplacePluginConfig {
|
|
1808
1733
|
values: Record<string, string>;
|
|
1809
1734
|
delimiters?: [string, string];
|
|
@@ -1852,6 +1777,13 @@ interface BindingTsconfigCompilerOptions {
|
|
|
1852
1777
|
experimentalDecorators?: boolean;
|
|
1853
1778
|
/** Enables decorator metadata emission. */
|
|
1854
1779
|
emitDecoratorMetadata?: boolean;
|
|
1780
|
+
/** Enables all strict type-checking options. Used as the fallback for `strictNullChecks`. */
|
|
1781
|
+
strict?: boolean;
|
|
1782
|
+
/**
|
|
1783
|
+
* Enables strict null checks. Controls whether `null`/`undefined` are elided from
|
|
1784
|
+
* nullable-union `design:type` decorator metadata.
|
|
1785
|
+
*/
|
|
1786
|
+
strictNullChecks?: boolean;
|
|
1855
1787
|
/** Preserves module structure of imports/exports. */
|
|
1856
1788
|
verbatimModuleSyntax?: boolean;
|
|
1857
1789
|
/** Configures how class fields are emitted. */
|
|
@@ -1885,14 +1817,6 @@ interface BindingViteBuildImportAnalysisPluginConfig {
|
|
|
1885
1817
|
optimizeModulePreloadRelativePaths: boolean;
|
|
1886
1818
|
renderBuiltUrl: boolean;
|
|
1887
1819
|
isRelativeBase: boolean;
|
|
1888
|
-
v2?: BindingViteBuildImportAnalysisPluginV2Config;
|
|
1889
|
-
}
|
|
1890
|
-
interface BindingViteBuildImportAnalysisPluginV2Config {
|
|
1891
|
-
isSsr: boolean;
|
|
1892
|
-
urlBase: string;
|
|
1893
|
-
decodedBase: string;
|
|
1894
|
-
modulePreload: false | BindingModulePreloadOptions;
|
|
1895
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1896
1820
|
}
|
|
1897
1821
|
interface BindingViteDynamicImportVarsPluginConfig {
|
|
1898
1822
|
sourcemap?: boolean;
|
|
@@ -1914,7 +1838,6 @@ type BindingViteJsonPluginStringify = boolean | string;
|
|
|
1914
1838
|
interface BindingViteManifestPluginConfig {
|
|
1915
1839
|
root: string;
|
|
1916
1840
|
outPath: string;
|
|
1917
|
-
isEnableV2?: boolean;
|
|
1918
1841
|
isLegacy?: (args: BindingNormalizedOptions) => boolean;
|
|
1919
1842
|
cssEntries: () => Record<string, string>;
|
|
1920
1843
|
}
|