@rolldown/browser 1.0.0-rc.4 → 1.0.0-rc.6
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 +24 -14
- package/dist/config.d.mts +9 -1
- package/dist/config.mjs +8 -8
- package/dist/{constructors-D2wC6vT5.js → constructors-WyngiSlS.js} +6 -0
- package/dist/{error-DfXdOVMF.js → error-D4EjR7H_.js} +9 -5
- package/dist/experimental-index.browser.mjs +4 -4
- package/dist/experimental-index.d.mts +8 -8
- package/dist/experimental-index.mjs +7 -7
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +24 -1
- package/dist/get-log-filter.d.mts +3 -7
- package/dist/get-log-filter.mjs +22 -0
- package/dist/index.browser.mjs +2 -2
- package/dist/index.d.mts +4 -5
- package/dist/index.mjs +8 -8
- package/dist/parallel-plugin-worker.mjs +4 -4
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +27 -3
- package/dist/parse-ast-index.mjs +17 -1
- package/dist/plugins-index.browser.mjs +6 -3
- package/dist/plugins-index.d.mts +7 -4
- package/dist/plugins-index.mjs +7 -4
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-gXO5p6r0.js → rolldown-build-DwnjyX40.js} +31 -28
- package/dist/shared/{bindingify-input-options-B32m-wO8.mjs → bindingify-input-options-CSIYh5O4.mjs} +17 -21
- package/dist/shared/{constructors-f9W8MQZ_.mjs → constructors-B2viugwd.mjs} +7 -1
- package/dist/shared/{constructors-CtryxP-m.d.mts → constructors-C1tQjDsj.d.mts} +7 -1
- package/dist/shared/{define-config-MImu5XA0.d.mts → define-config-DMEhSrNE.d.mts} +98 -30
- package/dist/shared/get-log-filter-semyr3Lj.d.mts +35 -0
- package/dist/shared/{load-config-nINjF42i.mjs → load-config-CmC4WvoS.mjs} +9 -1
- package/dist/shared/{parse-C5IFYsFB.mjs → parse-DIZtKd4C.mjs} +9 -5
- package/dist/shared/{rolldown-CkjERUOD.mjs → rolldown-D7O5_axp.mjs} +1 -1
- package/dist/shared/{rolldown-build-nvl-pSiK.mjs → rolldown-build-BV90HQts.mjs} +13 -14
- package/dist/shared/{transform-ChAcTNv3.d.mts → transform-BSAGL1b_.d.mts} +64 -24
- package/dist/shared/{transform-DhHPKnL-.mjs → transform-D49mi4JH.mjs} +12 -10
- package/dist/shared/{types-C2Sw7GCQ.d.mts → types-Cx3HYorz.d.mts} +4 -2
- package/dist/shared/{watch-CC4jn0NJ.mjs → watch-COON6c2j.mjs} +4 -4
- package/dist/{transform-DmR2FE2Q.js → transform-qJgOBSav.js} +12 -10
- package/dist/utils-index.browser.mjs +2422 -3
- package/dist/utils-index.d.mts +374 -2
- package/dist/utils-index.mjs +2423 -4
- package/package.json +1 -1
- /package/dist/shared/{composable-filters-CIxSuZSM.mjs → composable-filters-C_jBPRPI.mjs} +0 -0
- /package/dist/shared/{define-config-BVG4QvnP.mjs → define-config-BMj_QknW.mjs} +0 -0
- /package/dist/shared/{error-DTJQ7tjB.mjs → error-DDzqVYr_.mjs} +0 -0
- /package/dist/shared/{logging-C28dTP71.d.mts → logging-C6h4g8dA.d.mts} +0 -0
- /package/dist/shared/{normalize-string-or-regex-CdT2cmt4.mjs → normalize-string-or-regex-FTOVR1Jb.mjs} +0 -0
- /package/dist/shared/{prompt-BcvPElI8.mjs → prompt-B56gTa4S.mjs} +0 -0
- /package/dist/shared/{utils-DOXNRW_3.d.mts → utils-6wxe_LMG.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as logCycleLoading, f as logNoFileSystemInBrowser, g as getCodeFrame, h as locate, i as bindingifyManifestPlugin, l as logInputHookInOutputPlugin, m as logPluginError, n as BuiltinPlugin, o as augmentCodeLocation, p as logParseError, r as bindingifyBuiltInPlugin, s as error, t as normalizedStringOrRegex, u as logInvalidLogPosition } from "./normalize-string-or-regex-B0X1hEA4.js";
|
|
2
|
-
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
2
|
+
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-D4EjR7H_.js";
|
|
3
3
|
import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
4
4
|
|
|
5
5
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
@@ -452,7 +452,7 @@ const win32 = /* @__PURE__ */ mix(";");
|
|
|
452
452
|
|
|
453
453
|
//#endregion
|
|
454
454
|
//#region package.json
|
|
455
|
-
var version = "1.0.0-rc.
|
|
455
|
+
var version = "1.0.0-rc.6";
|
|
456
456
|
|
|
457
457
|
//#endregion
|
|
458
458
|
//#region src/constants/version.ts
|
|
@@ -1937,6 +1937,7 @@ const ModuleTypesSchema = record(string(), union([
|
|
|
1937
1937
|
literal("asset"),
|
|
1938
1938
|
literal("base64"),
|
|
1939
1939
|
literal("binary"),
|
|
1940
|
+
literal("copy"),
|
|
1940
1941
|
literal("css"),
|
|
1941
1942
|
literal("dataurl"),
|
|
1942
1943
|
literal("empty"),
|
|
@@ -2051,7 +2052,8 @@ const ChecksOptionsSchema = strictObject({
|
|
|
2051
2052
|
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warnings when Rolldown could not clean the output directory")),
|
|
2052
2053
|
pluginTimings: pipe(optional(boolean()), description("Whether to emit warnings when plugins take significant time during the build process")),
|
|
2053
2054
|
duplicateShebang: pipe(optional(boolean()), description("Whether to emit warnings when both the code and postBanner contain shebang")),
|
|
2054
|
-
unsupportedTsconfigOption: pipe(optional(boolean()), description("Whether to emit warnings when a tsconfig option or combination of options is not supported"))
|
|
2055
|
+
unsupportedTsconfigOption: pipe(optional(boolean()), description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
|
|
2056
|
+
ineffectiveDynamicImport: pipe(optional(boolean()), description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting"))
|
|
2055
2057
|
});
|
|
2056
2058
|
isTypeTrue();
|
|
2057
2059
|
const CompressOptionsKeepNamesSchema = strictObject({
|
|
@@ -2275,7 +2277,9 @@ const AdvancedChunksSchema = strictObject({
|
|
|
2275
2277
|
minShareCount: optional(number()),
|
|
2276
2278
|
maxSize: optional(number()),
|
|
2277
2279
|
minModuleSize: optional(number()),
|
|
2278
|
-
maxModuleSize: optional(number())
|
|
2280
|
+
maxModuleSize: optional(number()),
|
|
2281
|
+
entriesAware: optional(boolean()),
|
|
2282
|
+
entriesAwareMergeThreshold: optional(number())
|
|
2279
2283
|
})))
|
|
2280
2284
|
});
|
|
2281
2285
|
isTypeTrue();
|
|
@@ -2326,8 +2330,6 @@ const OutputOptionsSchema = strictObject({
|
|
|
2326
2330
|
assetFileNames: optional(AssetFileNamesSchema),
|
|
2327
2331
|
entryFileNames: optional(ChunkFileNamesSchema),
|
|
2328
2332
|
chunkFileNames: optional(ChunkFileNamesSchema),
|
|
2329
|
-
cssEntryFileNames: optional(ChunkFileNamesSchema),
|
|
2330
|
-
cssChunkFileNames: optional(ChunkFileNamesSchema),
|
|
2331
2333
|
sanitizeFileName: optional(SanitizeFileNameSchema),
|
|
2332
2334
|
minify: pipe(optional(union([
|
|
2333
2335
|
boolean(),
|
|
@@ -2370,8 +2372,6 @@ const OutputCliOverrideSchema = strictObject({
|
|
|
2370
2372
|
assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
|
|
2371
2373
|
entryFileNames: pipe(optional(string()), description("Name pattern for emitted entry chunks")),
|
|
2372
2374
|
chunkFileNames: pipe(optional(string()), description("Name pattern for emitted secondary chunks")),
|
|
2373
|
-
cssEntryFileNames: pipe(optional(string()), description("Name pattern for emitted css entry chunks")),
|
|
2374
|
-
cssChunkFileNames: pipe(optional(string()), description("Name pattern for emitted css secondary chunks")),
|
|
2375
2375
|
sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
|
|
2376
2376
|
banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
|
|
2377
2377
|
footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
|
|
@@ -2565,7 +2565,7 @@ function bindingAssetSource(source) {
|
|
|
2565
2565
|
}
|
|
2566
2566
|
|
|
2567
2567
|
//#endregion
|
|
2568
|
-
//#region \0@oxc-project+runtime@0.
|
|
2568
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/decorate.js
|
|
2569
2569
|
function __decorate(decorators, target, key, desc) {
|
|
2570
2570
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2571
2571
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2966,6 +2966,14 @@ const defaultParserOptions = {
|
|
|
2966
2966
|
lang: "js",
|
|
2967
2967
|
preserveParens: false
|
|
2968
2968
|
};
|
|
2969
|
+
/**
|
|
2970
|
+
* Parse code synchronously and return the AST.
|
|
2971
|
+
*
|
|
2972
|
+
* This function is similar to Rollup's `parseAst` function.
|
|
2973
|
+
* Prefer using {@linkcode parseSync} instead of this function as it has more information in the return value.
|
|
2974
|
+
*
|
|
2975
|
+
* @category Utilities
|
|
2976
|
+
*/
|
|
2969
2977
|
function parseAst(sourceText, options, filename) {
|
|
2970
2978
|
return wrap(parseSync$1(filename ?? "file.js", sourceText, {
|
|
2971
2979
|
...defaultParserOptions,
|
|
@@ -2990,6 +2998,7 @@ function transformModuleInfo(info, option) {
|
|
|
2990
2998
|
dynamicallyImportedIds: info.dynamicallyImportedIds,
|
|
2991
2999
|
exports: info.exports,
|
|
2992
3000
|
isEntry: info.isEntry,
|
|
3001
|
+
inputFormat: info.inputFormat,
|
|
2993
3002
|
...option
|
|
2994
3003
|
};
|
|
2995
3004
|
}
|
|
@@ -3094,7 +3103,7 @@ function exclude(expr) {
|
|
|
3094
3103
|
}
|
|
3095
3104
|
|
|
3096
3105
|
//#endregion
|
|
3097
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
3106
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
|
|
3098
3107
|
function e(e, t, n) {
|
|
3099
3108
|
let r = (n) => e(n, ...t);
|
|
3100
3109
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -3104,7 +3113,7 @@ function e(e, t, n) {
|
|
|
3104
3113
|
}
|
|
3105
3114
|
|
|
3106
3115
|
//#endregion
|
|
3107
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
3116
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/purry.js
|
|
3108
3117
|
function t$1(t, n, r) {
|
|
3109
3118
|
let i = t.length - n.length;
|
|
3110
3119
|
if (i === 0) return t(...n);
|
|
@@ -3113,7 +3122,7 @@ function t$1(t, n, r) {
|
|
|
3113
3122
|
}
|
|
3114
3123
|
|
|
3115
3124
|
//#endregion
|
|
3116
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
3125
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/partition.js
|
|
3117
3126
|
function t(...t) {
|
|
3118
3127
|
return t$1(n, t);
|
|
3119
3128
|
}
|
|
@@ -3482,13 +3491,16 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
3482
3491
|
|
|
3483
3492
|
//#endregion
|
|
3484
3493
|
//#region src/plugin/bindingify-build-hooks.ts
|
|
3494
|
+
function createPluginContext(args, ctx) {
|
|
3495
|
+
return new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode);
|
|
3496
|
+
}
|
|
3485
3497
|
function bindingifyBuildStart(args) {
|
|
3486
3498
|
const hook = args.plugin.buildStart;
|
|
3487
3499
|
if (!hook) return {};
|
|
3488
3500
|
const { handler, meta } = normalizeHook(hook);
|
|
3489
3501
|
return {
|
|
3490
3502
|
plugin: async (ctx, opts) => {
|
|
3491
|
-
await handler.call(
|
|
3503
|
+
await handler.call(createPluginContext(args, ctx), args.pluginContextData.getInputOptions(opts));
|
|
3492
3504
|
},
|
|
3493
3505
|
meta: bindingifyPluginHookMeta(meta)
|
|
3494
3506
|
};
|
|
@@ -3499,7 +3511,7 @@ function bindingifyBuildEnd(args) {
|
|
|
3499
3511
|
const { handler, meta } = normalizeHook(hook);
|
|
3500
3512
|
return {
|
|
3501
3513
|
plugin: async (ctx, err) => {
|
|
3502
|
-
await handler.call(
|
|
3514
|
+
await handler.call(createPluginContext(args, ctx), err ? aggregateBindingErrorsIntoJsError(err) : void 0);
|
|
3503
3515
|
},
|
|
3504
3516
|
meta: bindingifyPluginHookMeta(meta)
|
|
3505
3517
|
};
|
|
@@ -3511,7 +3523,7 @@ function bindingifyResolveId(args) {
|
|
|
3511
3523
|
return {
|
|
3512
3524
|
plugin: async (ctx, specifier, importer, extraOptions) => {
|
|
3513
3525
|
const contextResolveOptions = extraOptions.custom != null ? args.pluginContextData.getSavedResolveOptions(extraOptions.custom) : void 0;
|
|
3514
|
-
const ret = await handler.call(
|
|
3526
|
+
const ret = await handler.call(createPluginContext(args, ctx), specifier, importer ?? void 0, {
|
|
3515
3527
|
...extraOptions,
|
|
3516
3528
|
custom: contextResolveOptions?.custom
|
|
3517
3529
|
});
|
|
@@ -3548,7 +3560,7 @@ function bindingifyResolveDynamicImport(args) {
|
|
|
3548
3560
|
const { handler, meta } = normalizeHook(hook);
|
|
3549
3561
|
return {
|
|
3550
3562
|
plugin: async (ctx, specifier, importer) => {
|
|
3551
|
-
const ret = await handler.call(
|
|
3563
|
+
const ret = await handler.call(createPluginContext(args, ctx), specifier, importer ?? void 0);
|
|
3552
3564
|
if (ret == null) return;
|
|
3553
3565
|
if (ret === false) return {
|
|
3554
3566
|
id: specifier,
|
|
@@ -3674,7 +3686,7 @@ function bindingifyModuleParsed(args) {
|
|
|
3674
3686
|
const { handler, meta } = normalizeHook(hook);
|
|
3675
3687
|
return {
|
|
3676
3688
|
plugin: async (ctx, moduleInfo) => {
|
|
3677
|
-
await handler.call(
|
|
3689
|
+
await handler.call(createPluginContext(args, ctx), transformModuleInfo(moduleInfo, args.pluginContextData.getModuleOption(moduleInfo.id)));
|
|
3678
3690
|
},
|
|
3679
3691
|
meta: bindingifyPluginHookMeta(meta)
|
|
3680
3692
|
};
|
|
@@ -4148,12 +4160,6 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
4148
4160
|
get sourcemapBaseUrl() {
|
|
4149
4161
|
return this.inner.sourcemapBaseUrl ?? void 0;
|
|
4150
4162
|
}
|
|
4151
|
-
get cssEntryFileNames() {
|
|
4152
|
-
return this.inner.cssEntryFilenames || this.outputOptions.cssEntryFileNames;
|
|
4153
|
-
}
|
|
4154
|
-
get cssChunkFileNames() {
|
|
4155
|
-
return this.inner.cssChunkFilenames || this.outputOptions.cssChunkFileNames;
|
|
4156
|
-
}
|
|
4157
4163
|
get shimMissingExports() {
|
|
4158
4164
|
return this.inner.shimMissingExports;
|
|
4159
4165
|
}
|
|
@@ -4270,8 +4276,6 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "format", null);
|
|
|
4270
4276
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "exports", null);
|
|
4271
4277
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemap", null);
|
|
4272
4278
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapBaseUrl", null);
|
|
4273
|
-
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "cssEntryFileNames", null);
|
|
4274
|
-
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "cssChunkFileNames", null);
|
|
4275
4279
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "shimMissingExports", null);
|
|
4276
4280
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "name", null);
|
|
4277
4281
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "file", null);
|
|
@@ -5124,7 +5128,8 @@ const logger = createConsola({ formatOptions: { date: false } });
|
|
|
5124
5128
|
//#endregion
|
|
5125
5129
|
//#region src/utils/bindingify-output-options.ts
|
|
5126
5130
|
function bindingifyOutputOptions(outputOptions) {
|
|
5127
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames,
|
|
5131
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
5132
|
+
if (legalComments != null) logger.warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
|
|
5128
5133
|
const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks);
|
|
5129
5134
|
return {
|
|
5130
5135
|
dir,
|
|
@@ -5152,8 +5157,6 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
5152
5157
|
assetFileNames: bindingifyAssetFilenames(assetFileNames),
|
|
5153
5158
|
entryFileNames,
|
|
5154
5159
|
chunkFileNames,
|
|
5155
|
-
cssEntryFileNames,
|
|
5156
|
-
cssChunkFileNames,
|
|
5157
5160
|
plugins: [],
|
|
5158
5161
|
minify: outputOptions.minify,
|
|
5159
5162
|
externalLiveBindings: outputOptions.externalLiveBindings,
|
package/dist/shared/{bindingify-input-options-B32m-wO8.mjs → bindingify-input-options-CSIYh5O4.mjs}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-CCc_0vhs.mjs";
|
|
2
|
-
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
3
|
-
import { _ as noop, a as id, b as unsupported, f as or, h as arraify, n as code, r as exclude, s as include, t as and, u as moduleType, y as unreachable } from "./composable-filters-
|
|
4
|
-
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
2
|
+
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-FTOVR1Jb.mjs";
|
|
3
|
+
import { _ as noop, a as id, b as unsupported, f as or, h as arraify, n as code, r as exclude, s as include, t as and, u as moduleType, y as unreachable } from "./composable-filters-C_jBPRPI.mjs";
|
|
4
|
+
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-DDzqVYr_.mjs";
|
|
5
5
|
import { parseAst } from "../parse-ast-index.mjs";
|
|
6
6
|
import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects } from "../rolldown-binding.wasi.cjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fsp from "node:fs/promises";
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-rc.
|
|
11
|
+
var version = "1.0.0-rc.6";
|
|
12
12
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
@@ -227,7 +227,7 @@ function bindingAssetSource(source) {
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
//#endregion
|
|
230
|
-
//#region \0@oxc-project+runtime@0.
|
|
230
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/decorate.js
|
|
231
231
|
function __decorate(decorators, target, key, desc) {
|
|
232
232
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
233
233
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -592,6 +592,7 @@ function transformModuleInfo(info, option) {
|
|
|
592
592
|
dynamicallyImportedIds: info.dynamicallyImportedIds,
|
|
593
593
|
exports: info.exports,
|
|
594
594
|
isEntry: info.isEntry,
|
|
595
|
+
inputFormat: info.inputFormat,
|
|
595
596
|
...option
|
|
596
597
|
};
|
|
597
598
|
}
|
|
@@ -612,7 +613,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
|
|
|
612
613
|
}
|
|
613
614
|
|
|
614
615
|
//#endregion
|
|
615
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
616
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
|
|
616
617
|
function e(e, t, n) {
|
|
617
618
|
let r = (n) => e(n, ...t);
|
|
618
619
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -622,7 +623,7 @@ function e(e, t, n) {
|
|
|
622
623
|
}
|
|
623
624
|
|
|
624
625
|
//#endregion
|
|
625
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
626
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/purry.js
|
|
626
627
|
function t$1(t, n, r) {
|
|
627
628
|
let i = t.length - n.length;
|
|
628
629
|
if (i === 0) return t(...n);
|
|
@@ -631,7 +632,7 @@ function t$1(t, n, r) {
|
|
|
631
632
|
}
|
|
632
633
|
|
|
633
634
|
//#endregion
|
|
634
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
635
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/partition.js
|
|
635
636
|
function t(...t) {
|
|
636
637
|
return t$1(n, t);
|
|
637
638
|
}
|
|
@@ -995,13 +996,16 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
995
996
|
|
|
996
997
|
//#endregion
|
|
997
998
|
//#region src/plugin/bindingify-build-hooks.ts
|
|
999
|
+
function createPluginContext(args, ctx) {
|
|
1000
|
+
return new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode);
|
|
1001
|
+
}
|
|
998
1002
|
function bindingifyBuildStart(args) {
|
|
999
1003
|
const hook = args.plugin.buildStart;
|
|
1000
1004
|
if (!hook) return {};
|
|
1001
1005
|
const { handler, meta } = normalizeHook(hook);
|
|
1002
1006
|
return {
|
|
1003
1007
|
plugin: async (ctx, opts) => {
|
|
1004
|
-
await handler.call(
|
|
1008
|
+
await handler.call(createPluginContext(args, ctx), args.pluginContextData.getInputOptions(opts));
|
|
1005
1009
|
},
|
|
1006
1010
|
meta: bindingifyPluginHookMeta(meta)
|
|
1007
1011
|
};
|
|
@@ -1012,7 +1016,7 @@ function bindingifyBuildEnd(args) {
|
|
|
1012
1016
|
const { handler, meta } = normalizeHook(hook);
|
|
1013
1017
|
return {
|
|
1014
1018
|
plugin: async (ctx, err) => {
|
|
1015
|
-
await handler.call(
|
|
1019
|
+
await handler.call(createPluginContext(args, ctx), err ? aggregateBindingErrorsIntoJsError(err) : void 0);
|
|
1016
1020
|
},
|
|
1017
1021
|
meta: bindingifyPluginHookMeta(meta)
|
|
1018
1022
|
};
|
|
@@ -1024,7 +1028,7 @@ function bindingifyResolveId(args) {
|
|
|
1024
1028
|
return {
|
|
1025
1029
|
plugin: async (ctx, specifier, importer, extraOptions) => {
|
|
1026
1030
|
const contextResolveOptions = extraOptions.custom != null ? args.pluginContextData.getSavedResolveOptions(extraOptions.custom) : void 0;
|
|
1027
|
-
const ret = await handler.call(
|
|
1031
|
+
const ret = await handler.call(createPluginContext(args, ctx), specifier, importer ?? void 0, {
|
|
1028
1032
|
...extraOptions,
|
|
1029
1033
|
custom: contextResolveOptions?.custom
|
|
1030
1034
|
});
|
|
@@ -1061,7 +1065,7 @@ function bindingifyResolveDynamicImport(args) {
|
|
|
1061
1065
|
const { handler, meta } = normalizeHook(hook);
|
|
1062
1066
|
return {
|
|
1063
1067
|
plugin: async (ctx, specifier, importer) => {
|
|
1064
|
-
const ret = await handler.call(
|
|
1068
|
+
const ret = await handler.call(createPluginContext(args, ctx), specifier, importer ?? void 0);
|
|
1065
1069
|
if (ret == null) return;
|
|
1066
1070
|
if (ret === false) return {
|
|
1067
1071
|
id: specifier,
|
|
@@ -1187,7 +1191,7 @@ function bindingifyModuleParsed(args) {
|
|
|
1187
1191
|
const { handler, meta } = normalizeHook(hook);
|
|
1188
1192
|
return {
|
|
1189
1193
|
plugin: async (ctx, moduleInfo) => {
|
|
1190
|
-
await handler.call(
|
|
1194
|
+
await handler.call(createPluginContext(args, ctx), transformModuleInfo(moduleInfo, args.pluginContextData.getModuleOption(moduleInfo.id)));
|
|
1191
1195
|
},
|
|
1192
1196
|
meta: bindingifyPluginHookMeta(meta)
|
|
1193
1197
|
};
|
|
@@ -1661,12 +1665,6 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
1661
1665
|
get sourcemapBaseUrl() {
|
|
1662
1666
|
return this.inner.sourcemapBaseUrl ?? void 0;
|
|
1663
1667
|
}
|
|
1664
|
-
get cssEntryFileNames() {
|
|
1665
|
-
return this.inner.cssEntryFilenames || this.outputOptions.cssEntryFileNames;
|
|
1666
|
-
}
|
|
1667
|
-
get cssChunkFileNames() {
|
|
1668
|
-
return this.inner.cssChunkFilenames || this.outputOptions.cssChunkFileNames;
|
|
1669
|
-
}
|
|
1670
1668
|
get shimMissingExports() {
|
|
1671
1669
|
return this.inner.shimMissingExports;
|
|
1672
1670
|
}
|
|
@@ -1783,8 +1781,6 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "format", null);
|
|
|
1783
1781
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "exports", null);
|
|
1784
1782
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemap", null);
|
|
1785
1783
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapBaseUrl", null);
|
|
1786
|
-
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "cssEntryFileNames", null);
|
|
1787
|
-
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "cssChunkFileNames", null);
|
|
1788
1784
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "shimMissingExports", null);
|
|
1789
1785
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "name", null);
|
|
1790
1786
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "file", null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-FTOVR1Jb.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/builtin-plugin/constructors.ts
|
|
4
4
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
@@ -41,6 +41,12 @@ function isolatedDeclarationPlugin(config) {
|
|
|
41
41
|
function viteWebWorkerPostPlugin() {
|
|
42
42
|
return new BuiltinPlugin("builtin:vite-web-worker-post");
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* A plugin that converts CommonJS require() calls for external dependencies into ESM import statements.
|
|
46
|
+
*
|
|
47
|
+
* @see https://rolldown.rs/builtin-plugins/esm-external-require
|
|
48
|
+
* @category Builtin Plugins
|
|
49
|
+
*/
|
|
44
50
|
function esmExternalRequirePlugin(config) {
|
|
45
51
|
const plugin = new BuiltinPlugin("builtin:esm-external-require", config);
|
|
46
52
|
plugin.enforce = "pre";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-
|
|
1
|
+
import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-6wxe_LMG.mjs";
|
|
2
2
|
import { BindingEsmExternalRequirePluginConfig, BindingIsolatedDeclarationPluginConfig, BindingViteBuildImportAnalysisPluginConfig, BindingViteDynamicImportVarsPluginConfig, BindingViteImportGlobPluginConfig, BindingViteJsonPluginConfig, BindingViteModulePreloadPolyfillPluginConfig, BindingViteReactRefreshWrapperPluginConfig, BindingViteReporterPluginConfig, BindingViteResolvePluginConfig } from "../binding.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
@@ -17,6 +17,12 @@ declare function viteBuildImportAnalysisPlugin(config: BindingViteBuildImportAna
|
|
|
17
17
|
declare function viteResolvePlugin(config: Omit<BindingViteResolvePluginConfig, "yarnPnp">): BuiltinPlugin;
|
|
18
18
|
declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
|
|
19
19
|
declare function viteWebWorkerPostPlugin(): BuiltinPlugin;
|
|
20
|
+
/**
|
|
21
|
+
* A plugin that converts CommonJS require() calls for external dependencies into ESM import statements.
|
|
22
|
+
*
|
|
23
|
+
* @see https://rolldown.rs/builtin-plugins/esm-external-require
|
|
24
|
+
* @category Builtin Plugins
|
|
25
|
+
*/
|
|
20
26
|
declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
|
|
21
27
|
type ViteReactRefreshWrapperPluginConfig = Omit<BindingViteReactRefreshWrapperPluginConfig, "include" | "exclude"> & {
|
|
22
28
|
include?: StringOrRegExp | StringOrRegExp[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as NullValue, i as MaybePromise, n as MakeAsync, o as PartialNull, r as MaybeArray, s as StringOrRegExp$1, t as BuiltinPlugin } from "./utils-
|
|
1
|
+
import { Dt as Program } from "./types-Cx3HYorz.mjs";
|
|
2
|
+
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-C6h4g8dA.mjs";
|
|
3
|
+
import { a as NullValue, i as MaybePromise, n as MakeAsync, o as PartialNull, r as MaybeArray, s as StringOrRegExp$1, t as BuiltinPlugin } from "./utils-6wxe_LMG.mjs";
|
|
4
4
|
import { BindingHookResolveIdExtraArgs, BindingMagicString, BindingPluginContextResolveOptions, BindingRenderedChunk, BindingTransformHookExtraArgs, ExternalMemoryStatus, JsxOptions, MinifyOptions, ParserOptions, PreRenderedChunk, TransformOptions } from "../binding.cjs";
|
|
5
5
|
import { BindingWatcherBundler } from "../../binding.cjs";
|
|
6
|
+
import { BindingMagicString as BindingMagicString$1, PreRenderedChunk as PreRenderedChunk$1 } from "./binding.cjs";
|
|
6
7
|
|
|
7
8
|
//#region src/types/misc.d.ts
|
|
8
9
|
/** @inline */
|
|
@@ -51,6 +52,16 @@ interface ModuleInfo extends ModuleOptions {
|
|
|
51
52
|
* Whether this module is a user- or plugin-defined entry point.
|
|
52
53
|
*/
|
|
53
54
|
isEntry: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The detected format of the module, based on both its syntax and module definition
|
|
57
|
+
* metadata (such as `package.json` `type` and file extensions like `.mjs`/`.cjs`/`.mts`/`.cts`).
|
|
58
|
+
* - "esm" for ES modules (has `import`/`export` statements or is defined as ESM by module metadata)
|
|
59
|
+
* - "cjs" for CommonJS modules (uses `module.exports`, `exports`, top-level `return`, or is defined as CommonJS by module metadata)
|
|
60
|
+
* - "unknown" when the format could not be determined from either syntax or module definition metadata
|
|
61
|
+
*
|
|
62
|
+
* @experimental
|
|
63
|
+
*/
|
|
64
|
+
inputFormat: "es" | "cjs" | "unknown";
|
|
54
65
|
}
|
|
55
66
|
//#endregion
|
|
56
67
|
//#region src/utils/asset-source.d.ts
|
|
@@ -305,8 +316,17 @@ type CodeSplittingNameFunction = (moduleId: string, ctx: ChunkingContext) => str
|
|
|
305
316
|
type CodeSplittingTestFunction = (id: string) => boolean | undefined | void;
|
|
306
317
|
type MinifyOptions$1 = Omit<MinifyOptions, "module" | "sourcemap">;
|
|
307
318
|
interface CommentsOptions {
|
|
319
|
+
/**
|
|
320
|
+
* Comments that contain `@license`, `@preserve` or start with `//!` or `/*!`
|
|
321
|
+
*/
|
|
308
322
|
legal?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Comments that contain `@__PURE__`, `@__NO_SIDE_EFFECTS__` or `@vite-ignore`
|
|
325
|
+
*/
|
|
309
326
|
annotation?: boolean;
|
|
327
|
+
/**
|
|
328
|
+
* JSDoc comments
|
|
329
|
+
*/
|
|
310
330
|
jsdoc?: boolean;
|
|
311
331
|
}
|
|
312
332
|
/** @inline */
|
|
@@ -356,7 +376,7 @@ interface OutputOptions {
|
|
|
356
376
|
* - `'iife'` stands for [Immediately Invoked Function Expression](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
|
|
357
377
|
* - `'umd'` stands for [Universal Module Definition](https://github.com/umdjs/umd).
|
|
358
378
|
*
|
|
359
|
-
* @default '
|
|
379
|
+
* @default 'es'
|
|
360
380
|
*
|
|
361
381
|
*
|
|
362
382
|
*/
|
|
@@ -554,18 +574,6 @@ interface OutputOptions {
|
|
|
554
574
|
*/
|
|
555
575
|
chunkFileNames?: string | ChunkFileNamesFunction;
|
|
556
576
|
/**
|
|
557
|
-
* @default '[name].css'
|
|
558
|
-
* @experimental
|
|
559
|
-
* @hidden not ready for public usage yet
|
|
560
|
-
*/
|
|
561
|
-
cssEntryFileNames?: string | ChunkFileNamesFunction;
|
|
562
|
-
/**
|
|
563
|
-
* @default '[name]-[hash].css'
|
|
564
|
-
* @experimental
|
|
565
|
-
* @hidden not ready for public usage yet
|
|
566
|
-
*/
|
|
567
|
-
cssChunkFileNames?: string | ChunkFileNamesFunction;
|
|
568
|
-
/**
|
|
569
577
|
* Whether to enable chunk name sanitization (removal of non-URL-safe characters like `\0`, `?` and `*`).
|
|
570
578
|
*
|
|
571
579
|
* Set `false` to disable the sanitization. You can also provide a custom sanitization function.
|
|
@@ -759,6 +767,8 @@ interface OutputOptions {
|
|
|
759
767
|
*
|
|
760
768
|
* For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/in-depth/manual-code-splitting).
|
|
761
769
|
*
|
|
770
|
+
*
|
|
771
|
+
*
|
|
762
772
|
* @example
|
|
763
773
|
* **Basic vendor chunk**
|
|
764
774
|
* ```js
|
|
@@ -800,10 +810,12 @@ interface OutputOptions {
|
|
|
800
810
|
groups?: CodeSplittingGroup[];
|
|
801
811
|
};
|
|
802
812
|
/**
|
|
803
|
-
*
|
|
813
|
+
* Controls how legal comments are preserved in the output.
|
|
814
|
+
*
|
|
815
|
+
* - `none`: no legal comments
|
|
816
|
+
* - `inline`: preserve legal comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
|
|
804
817
|
*
|
|
805
|
-
*
|
|
806
|
-
* - `inline`: preserve comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
|
|
818
|
+
* @deprecated Use `comments.legal` instead. When both `legalComments` and `comments.legal` are set, `comments.legal` takes priority.
|
|
807
819
|
*/
|
|
808
820
|
legalComments?: "none" | "inline";
|
|
809
821
|
/**
|
|
@@ -812,15 +824,14 @@ interface OutputOptions {
|
|
|
812
824
|
* - `true`: Preserve legal, annotation, and JSDoc comments (default)
|
|
813
825
|
* - `false`: Strip all comments
|
|
814
826
|
* - Object: Granular control over comment categories
|
|
815
|
-
* - `legal`: `@license`, `@preserve`, `//!`, `/*!`
|
|
816
|
-
* - `annotation`: `@__PURE__`, `@__NO_SIDE_EFFECTS__`, `@vite-ignore`
|
|
817
|
-
* - `jsdoc`: JSDoc comments
|
|
818
827
|
*
|
|
819
828
|
* Note: Regular line and block comments without these markers
|
|
820
829
|
* are always removed regardless of this option.
|
|
821
830
|
*
|
|
822
831
|
* When both `legalComments` and `comments.legal` are set, `comments.legal` takes priority.
|
|
823
832
|
*
|
|
833
|
+
*
|
|
834
|
+
*
|
|
824
835
|
* @default true
|
|
825
836
|
*/
|
|
826
837
|
comments?: boolean | CommentsOptions;
|
|
@@ -1046,6 +1057,36 @@ type CodeSplittingGroup = {
|
|
|
1046
1057
|
* @default 0
|
|
1047
1058
|
*/
|
|
1048
1059
|
minModuleSize?: number;
|
|
1060
|
+
/**
|
|
1061
|
+
* When `false` (default), all matching modules are merged into a single chunk.
|
|
1062
|
+
* Every entry that uses any of these modules must load the entire chunk — even
|
|
1063
|
+
* modules it doesn't need.
|
|
1064
|
+
*
|
|
1065
|
+
* When `true`, matching modules are grouped by which entries actually import them.
|
|
1066
|
+
* Modules shared by the same set of entries go into the same chunk, while modules
|
|
1067
|
+
* shared by a different set go into a separate chunk. This way, each entry only
|
|
1068
|
+
* loads the code it actually uses.
|
|
1069
|
+
*
|
|
1070
|
+
* Example: entries A, B, C all match a `"vendor"` group.
|
|
1071
|
+
* - `moduleX` is used by A, B, C
|
|
1072
|
+
* - `moduleY` is used by A, B only
|
|
1073
|
+
*
|
|
1074
|
+
* With `entriesAware: false` → one `vendor.js` chunk with both modules; C loads `moduleY` unnecessarily.
|
|
1075
|
+
* With `entriesAware: true` → `vendor.js` (moduleX, loaded by all) + `vendor2.js` (moduleY, loaded by A and B only).
|
|
1076
|
+
*
|
|
1077
|
+
* @default false
|
|
1078
|
+
*/
|
|
1079
|
+
entriesAware?: boolean;
|
|
1080
|
+
/**
|
|
1081
|
+
* Size threshold in bytes for merging small `entriesAware` subgroups into the
|
|
1082
|
+
* closest neighboring subgroup.
|
|
1083
|
+
*
|
|
1084
|
+
* This option only works when {@linkcode CodeSplittingGroup.entriesAware | entriesAware}
|
|
1085
|
+
* is `true`. Set to `0` to disable subgroup merging.
|
|
1086
|
+
*
|
|
1087
|
+
* @default 0
|
|
1088
|
+
*/
|
|
1089
|
+
entriesAwareMergeThreshold?: number;
|
|
1049
1090
|
};
|
|
1050
1091
|
/**
|
|
1051
1092
|
* Alias for {@linkcode CodeSplittingGroup}. Use this type for the `codeSplitting.groups` option.
|
|
@@ -1480,6 +1521,11 @@ interface ChecksOptions {
|
|
|
1480
1521
|
* @default true
|
|
1481
1522
|
* */
|
|
1482
1523
|
unsupportedTsconfigOption?: boolean;
|
|
1524
|
+
/**
|
|
1525
|
+
* Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting.
|
|
1526
|
+
* @default true
|
|
1527
|
+
* */
|
|
1528
|
+
ineffectiveDynamicImport?: boolean;
|
|
1483
1529
|
}
|
|
1484
1530
|
//#endregion
|
|
1485
1531
|
//#region src/options/transform-options.d.ts
|
|
@@ -1639,10 +1685,6 @@ interface NormalizedOutputOptions {
|
|
|
1639
1685
|
sourcemap: boolean | "inline" | "hidden";
|
|
1640
1686
|
/** @see {@linkcode OutputOptions.sourcemapBaseUrl | sourcemapBaseUrl} */
|
|
1641
1687
|
sourcemapBaseUrl: string | undefined;
|
|
1642
|
-
/** @see {@linkcode OutputOptions.cssEntryFileNames | cssEntryFileNames} */
|
|
1643
|
-
cssEntryFileNames: string | ChunkFileNamesFunction;
|
|
1644
|
-
/** @see {@linkcode OutputOptions.cssChunkFileNames | cssChunkFileNames} */
|
|
1645
|
-
cssChunkFileNames: string | ChunkFileNamesFunction;
|
|
1646
1688
|
/** @see {@linkcode OutputOptions.codeSplitting | codeSplitting} */
|
|
1647
1689
|
codeSplitting: boolean;
|
|
1648
1690
|
/** @deprecated Use `codeSplitting` instead. */
|
|
@@ -1681,7 +1723,10 @@ interface NormalizedOutputOptions {
|
|
|
1681
1723
|
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
|
1682
1724
|
/** @see {@linkcode OutputOptions.minify | minify} */
|
|
1683
1725
|
minify: false | MinifyOptions$1 | "dce-only";
|
|
1684
|
-
/**
|
|
1726
|
+
/**
|
|
1727
|
+
* @deprecated Use `comments.legal` instead.
|
|
1728
|
+
* @see {@linkcode OutputOptions.legalComments | legalComments}
|
|
1729
|
+
*/
|
|
1685
1730
|
legalComments: "none" | "inline";
|
|
1686
1731
|
/** @see {@linkcode OutputOptions.comments | comments} */
|
|
1687
1732
|
comments: Required<CommentsOptions>;
|
|
@@ -2309,7 +2354,7 @@ type TreeshakingOptions = {
|
|
|
2309
2354
|
*
|
|
2310
2355
|
* See [related Oxc documentation](https://oxc.rs/docs/guide/usage/minifier/dead-code-elimination#ignoring-invalid-import-statement-side-effects) for more details.
|
|
2311
2356
|
*
|
|
2312
|
-
* @default
|
|
2357
|
+
* @default false
|
|
2313
2358
|
*/
|
|
2314
2359
|
invalidImportSideEffects?: boolean;
|
|
2315
2360
|
/**
|
|
@@ -2512,6 +2557,29 @@ type OverrideFilterObject = {
|
|
|
2512
2557
|
load?: HookFilterExtension<"load">["filter"];
|
|
2513
2558
|
pluginNamePattern?: StringOrRegExp$1[];
|
|
2514
2559
|
};
|
|
2560
|
+
/**
|
|
2561
|
+
* A helper function to add plugin hook filters to a plugin or an array of plugins.
|
|
2562
|
+
*
|
|
2563
|
+
* @example
|
|
2564
|
+
* ```ts
|
|
2565
|
+
* import yaml from '@rollup/plugin-yaml';
|
|
2566
|
+
* import { defineConfig } from 'rolldown';
|
|
2567
|
+
* import { withFilter } from 'rolldown/filter';
|
|
2568
|
+
*
|
|
2569
|
+
* export default defineConfig({
|
|
2570
|
+
* plugins: [
|
|
2571
|
+
* // Run the transform hook of the `yaml` plugin
|
|
2572
|
+
* // only for modules which end in `.yaml`
|
|
2573
|
+
* withFilter(
|
|
2574
|
+
* yaml({}),
|
|
2575
|
+
* { transform: { id: /\.yaml$/ } },
|
|
2576
|
+
* ),
|
|
2577
|
+
* ],
|
|
2578
|
+
* });
|
|
2579
|
+
* ```
|
|
2580
|
+
*
|
|
2581
|
+
* @category Config
|
|
2582
|
+
*/
|
|
2515
2583
|
declare function withFilter<A, T extends RolldownPluginOption<A>>(pluginOption: T, filterObject: OverrideFilterObject | OverrideFilterObject[]): T;
|
|
2516
2584
|
//#endregion
|
|
2517
2585
|
//#region src/plugin/index.d.ts
|
|
@@ -2996,7 +3064,7 @@ type InputOption = string | string[] | Record<string, string>;
|
|
|
2996
3064
|
type ExternalOptionFunction = (id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>;
|
|
2997
3065
|
/** @inline */
|
|
2998
3066
|
type ExternalOption = StringOrRegExp$1 | StringOrRegExp$1[] | ExternalOptionFunction;
|
|
2999
|
-
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
3067
|
+
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset" | "copy">;
|
|
3000
3068
|
interface WatcherOptions {
|
|
3001
3069
|
/**
|
|
3002
3070
|
* Whether to skip the {@linkcode RolldownBuild.write | bundle.write()} step when a rebuild is triggered.
|
|
@@ -3713,4 +3781,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
3713
3781
|
declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
|
|
3714
3782
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
3715
3783
|
//#endregion
|
|
3716
|
-
export {
|
|
3784
|
+
export { VERSION as $, OutputOptions as $t, TransformResult as A, watch as At, id as B, AdvancedChunksGroup as Bt, Plugin as C, InternalModuleFormat as Ct, RolldownPlugin as D, ChecksOptions as Dt, ResolvedId as E, TransformOptions$1 as Et, TopLevelFilterExpression as F, rolldown as Ft, moduleType as G, CodeSplittingNameFunction as Gt, include as H, ChunkFileNamesFunction as Ht, and as I, RolldownBuild as It, queries as J, GeneratedCodeOptions as Jt, not as K, CodeSplittingOptions as Kt, code as L, BuildOptions as Lt, FilterExpression as M, RolldownWatcherEvent as Mt, FilterExpressionKind as N, RolldownWatcherWatcherEventMap as Nt, RolldownPluginOption as O, LoggingFunction as Ot, QueryFilterObject as P, WatchOptions as Pt, RUNTIME_MODULE_ID as Q, ModuleFormat as Qt, exclude as R, build as Rt, PartialResolvedId as S, RolldownFsModule as St, ResolveIdResult as T, NormalizedInputOptions as Tt, interpreter as U, ChunkingContext as Ut, importerId as V, AdvancedChunksOptions as Vt, interpreterImpl as W, CodeSplittingGroup as Wt, BindingMagicString$1 as X, GlobalsFunction as Xt, query as Y, GeneratedCodePreset as Yt, PreRenderedChunk$1 as Z, MinifyOptions$1 as Zt, LoadResult as _, HookFilter as _t, ExternalOption as a, RolldownOutput as an, EmittedAsset as at, ObjectHook as b, RolldownDirectoryEntry as bt, InputOptions as c, ModuleInfo as cn, EmittedPrebuiltChunk as ct, WatcherOptions as d, PluginContextResolveOptions as dt, PreRenderedAsset as en, ExistingRawSourceMap as et, AsyncPluginHooks as f, DefineParallelPluginResult as ft, ImportKind as g, GeneralHookFilter as gt, HookFilterExtension as h, PluginContextMeta as ht, RolldownOptions as i, RenderedModule as in, TransformPluginContext as it, withFilter as j, RolldownWatcher as jt, SourceDescription as k, WarningHandlerWithDefault as kt, ModuleTypes as l, SourcemapIgnoreListOption as ln, GetModuleInfo as lt, FunctionPluginHooks as m, MinimalPluginContext as mt, RolldownOptionsFunction as n, OutputChunk as nn, OutputBundle as nt, ExternalOptionFunction as o, SourceMap$1 as on, EmittedChunk as ot, CustomPluginOptions as p, defineParallelPlugin as pt, or as q, CommentsOptions as qt, defineConfig as r, RenderedChunk as rn, TreeshakingOptions as rt, InputOption as s, freeExternalMemory as sn, EmittedFile as st, ConfigExport as t, OutputAsset as tn, SourceMapInput as tt, OptimizationOptions as u, PluginContext as ut, ModuleOptions as v, ModuleTypeFilter as vt, ResolveIdExtraOptions as w, NormalizedOutputOptions as wt, ParallelPluginHooks as x, RolldownFileStats as xt, ModuleType as y, BufferEncoding as yt, exprInterpreter as z, AddonFunction as zt };
|