@rolldown/browser 1.1.4 → 1.1.5
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 +11 -8
- package/dist/config.d.mts +15 -2
- package/dist/config.mjs +2 -2
- package/dist/{constructors-CnlRXsZI.js → constructors-Byrk1_73.js} +1 -1
- package/dist/{error-uXB8-_dW.js → error-DXre1AuB.js} +1 -1
- package/dist/experimental-index.browser.mjs +5 -5
- package/dist/experimental-index.d.mts +5 -5
- package/dist/experimental-index.mjs +5 -5
- package/dist/filter-index.d.mts +35 -1
- package/dist/index.browser.mjs +9 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +9 -3
- package/dist/{normalize-string-or-regex-A9UIvc9j.js → normalize-string-or-regex-Ccke9UdD.js} +7 -1
- package/dist/parallel-plugin-worker.mjs +1 -1
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -2
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/{resolve-tsconfig-CSjtpIN2.js → resolve-tsconfig-LwTDNg0M.js} +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-TKZlH-S1.js → rolldown-build-C-ytNE9x.js} +14 -13
- package/dist/shared/{binding-DyMVbTi5.d.mts → binding-BlEEMlGM.d.mts} +16 -4
- package/dist/shared/{bindingify-input-options-DrP86yzF.mjs → bindingify-input-options-CwvtdwoA.mjs} +9 -11
- package/dist/shared/{constructors-CAjrhG6p.mjs → constructors-BahhbY0t.mjs} +1 -1
- package/dist/shared/{constructors-CDyv7p8V.d.mts → constructors-CxRN1nW0.d.mts} +2 -2
- package/dist/shared/{define-config-CJihcT25.d.mts → define-config-CJTbYTo8.d.mts} +80 -35
- package/dist/shared/dist-DKbukT1H.mjs +154 -0
- package/dist/shared/{load-config-CZP4Hm1w.mjs → load-config-DyE9Nsvv.mjs} +19 -2
- package/dist/shared/{logs-aMKUxRpj.mjs → logs-ZGEh6uhb.mjs} +6 -1
- package/dist/shared/{normalize-string-or-regex-CHVaSqeF.mjs → normalize-string-or-regex-D93Gs8X1.mjs} +1 -1
- package/dist/shared/{parse-BodSuh47.mjs → parse-zUvsghAI.mjs} +1 -1
- package/dist/shared/{prompt-B1Yc1NPt.mjs → prompt--dNycKSZ.mjs} +59 -17
- package/dist/shared/{rolldown-build-DoAvyAYi.mjs → rolldown-build-_M7Yfopw.mjs} +31 -11
- package/dist/shared/{rolldown-Bn41UR3A.mjs → rolldown-q16hbH0c.mjs} +1 -1
- package/dist/shared/{transform-DudVZDD5.d.mts → transform-BJ9ymllw.d.mts} +1 -1
- package/dist/shared/{utils-DLIXIK5m.d.mts → utils-CEyV6qve.d.mts} +1 -1
- package/dist/shared/{watch-DVVUiYsP.mjs → watch-WLd1o3am.mjs} +3 -3
- package/dist/utils-index.browser.mjs +8 -6
- package/dist/utils-index.d.mts +3 -3
- package/dist/utils-index.mjs +7 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import {
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-WLd1o3am.mjs";
|
|
2
|
+
import { S as version, x as description } from "./shared/bindingify-input-options-CwvtdwoA.mjs";
|
|
3
3
|
import { y as arraify } from "./shared/filter-B_mD-HGz-Cbrk-2bt.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-_M7Yfopw.mjs";
|
|
5
|
+
import { t as rolldown } from "./shared/rolldown-q16hbH0c.mjs";
|
|
6
|
+
import { t as loadConfig } from "./shared/load-config-DyE9Nsvv.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import g$1 from "node:process";
|
|
9
9
|
import { performance } from "node:perf_hooks";
|
|
@@ -631,6 +631,7 @@ const alias = {
|
|
|
631
631
|
abbreviation: "c",
|
|
632
632
|
hint: "filename"
|
|
633
633
|
},
|
|
634
|
+
configLoader: { hint: "loader" },
|
|
634
635
|
help: { abbreviation: "h" },
|
|
635
636
|
version: { abbreviation: "v" },
|
|
636
637
|
watch: { abbreviation: "w" },
|
|
@@ -684,7 +685,8 @@ const reservedKeys = /* @__PURE__ */ new Set([
|
|
|
684
685
|
"version",
|
|
685
686
|
"config",
|
|
686
687
|
"watch",
|
|
687
|
-
"environment"
|
|
688
|
+
"environment",
|
|
689
|
+
"configLoader"
|
|
688
690
|
]);
|
|
689
691
|
function normalizeCliOptions(cliOptions, positionals) {
|
|
690
692
|
const [data, errors] = validateCliOptions(cliOptions);
|
|
@@ -705,6 +707,7 @@ function normalizeCliOptions(cliOptions, positionals) {
|
|
|
705
707
|
if (typeof options.config === "string") result.config = options.config;
|
|
706
708
|
else if (options.config === true) result.config = "";
|
|
707
709
|
if (options.environment !== void 0) result.environment = options.environment;
|
|
710
|
+
if (options.configLoader !== void 0) result.configLoader = options.configLoader;
|
|
708
711
|
const keysOfInput = new Set(getInputCliKeys());
|
|
709
712
|
const keysOfOutput = new Set(getOutputCliKeys());
|
|
710
713
|
for (let [key, value] of Object.entries(options)) {
|
|
@@ -859,7 +862,7 @@ function getClearScreenFunction(options) {
|
|
|
859
862
|
};
|
|
860
863
|
}
|
|
861
864
|
//#endregion
|
|
862
|
-
//#region \0@oxc-project+runtime@0.
|
|
865
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/usingCtx.js
|
|
863
866
|
function _usingCtx() {
|
|
864
867
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
865
868
|
var n = Error();
|
|
@@ -921,7 +924,7 @@ async function bundleWithConfig(configPath, cliOptions, rawArgs = {}) {
|
|
|
921
924
|
process.env.ROLLUP_WATCH = "true";
|
|
922
925
|
process.env.ROLLDOWN_WATCH = "true";
|
|
923
926
|
}
|
|
924
|
-
const config = await loadConfig(configPath);
|
|
927
|
+
const config = await loadConfig(configPath, { configLoader: cliOptions.configLoader });
|
|
925
928
|
const resolvedConfig = typeof config === "function" ? await config(rawArgs) : config;
|
|
926
929
|
if (typeof resolvedConfig !== "object" || resolvedConfig === null) {
|
|
927
930
|
logger.error(`Invalid configuration from ${configPath}: expected object or array, got ${resolvedConfig}`);
|
package/dist/config.d.mts
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
|
-
import { r as defineConfig, rt as VERSION, t as ConfigExport } from "./shared/define-config-
|
|
1
|
+
import { r as defineConfig, rt as VERSION, t as ConfigExport } from "./shared/define-config-CJTbYTo8.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/load-config.d.ts
|
|
4
|
+
type ConfigLoader = "bundle" | "native";
|
|
5
|
+
interface LoadConfigOptions {
|
|
6
|
+
/**
|
|
7
|
+
* How to load the config file.
|
|
8
|
+
* - `'bundle'` (default): bundle the config with Rolldown, then import it.
|
|
9
|
+
* - `'native'`: import the config directly, delegating TypeScript/loader
|
|
10
|
+
* handling to the runtime. Faster, but requires runtime support.
|
|
11
|
+
*
|
|
12
|
+
* @default 'bundle'
|
|
13
|
+
*/
|
|
14
|
+
configLoader?: ConfigLoader;
|
|
15
|
+
}
|
|
4
16
|
/**
|
|
5
17
|
* Load config from a file in a way that Rolldown does.
|
|
6
18
|
*
|
|
7
19
|
* @param configPath The path to the config file. If empty, it will look for `rolldown.config` with supported extensions in the current working directory.
|
|
20
|
+
* @param options Loading options. `configLoader` selects `'bundle'` (default) or `'native'`.
|
|
8
21
|
* @returns The loaded config export
|
|
9
22
|
*
|
|
10
23
|
* @category Config
|
|
11
24
|
*/
|
|
12
|
-
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
|
25
|
+
declare function loadConfig(configPath: string, options?: LoadConfigOptions): Promise<ConfigExport>;
|
|
13
26
|
//#endregion
|
|
14
27
|
export { VERSION, defineConfig, loadConfig };
|
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as VERSION } from "./shared/bindingify-input-options-CwvtdwoA.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-DyE9Nsvv.mjs";
|
|
4
4
|
export { VERSION, defineConfig, loadConfig };
|
|
@@ -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-Ccke9UdD.js";
|
|
2
2
|
//#region src/builtin-plugin/constructors.ts
|
|
3
3
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
4
4
|
return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
|
|
@@ -14,7 +14,7 @@ function bindingifySourcemap(map) {
|
|
|
14
14
|
} };
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
17
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.139.0/node_modules/oxc-parser/src-js/wrap.js
|
|
18
18
|
function wrap(result) {
|
|
19
19
|
let program, module, comments, errors;
|
|
20
20
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
2
|
-
import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-
|
|
3
|
-
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-
|
|
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 "./constructors-
|
|
5
|
-
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Ccke9UdD.js";
|
|
2
|
+
import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-C-ytNE9x.js";
|
|
3
|
+
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-DXre1AuB.js";
|
|
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 "./constructors-Byrk1_73.js";
|
|
5
|
+
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-LwTDNg0M.js";
|
|
6
6
|
import * as binding from "./rolldown-binding.wasi-browser.js";
|
|
7
7
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
8
8
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { fn as RolldownOutput, kt as NormalizedOutputOptions, l as InputOptions, mn as freeExternalMemory, on as OutputOptions, vt as defineParallelPlugin } from "./shared/define-config-
|
|
3
|
-
import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-
|
|
4
|
-
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-
|
|
5
|
-
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-
|
|
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-BlEEMlGM.mjs";
|
|
2
|
+
import { fn as RolldownOutput, kt as NormalizedOutputOptions, l as InputOptions, mn as freeExternalMemory, on as OutputOptions, vt as defineParallelPlugin } from "./shared/define-config-CJTbYTo8.mjs";
|
|
3
|
+
import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-CEyV6qve.mjs";
|
|
4
|
+
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-BJ9ymllw.mjs";
|
|
5
|
+
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-CxRN1nW0.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/api/dev/dev-options.d.ts
|
|
8
8
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-
|
|
3
|
-
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-D93Gs8X1.mjs";
|
|
2
|
+
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-CwvtdwoA.mjs";
|
|
3
|
+
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-_M7Yfopw.mjs";
|
|
4
4
|
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-B5cMIevi.mjs";
|
|
5
|
-
import { n as parseSync$2, t as parse$2 } from "./shared/parse-
|
|
6
|
-
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-
|
|
5
|
+
import { n as parseSync$2, t as parse$2 } from "./shared/parse-zUvsghAI.mjs";
|
|
6
|
+
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-BahhbY0t.mjs";
|
|
7
7
|
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./shared/resolve-tsconfig-DsK7KzKK.mjs";
|
|
8
8
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,2 +1,36 @@
|
|
|
1
|
-
import { $ as prefixRegex, B as exactRegex, F as FilterExpressionKind, G as importerId, H as exprInterpreter, I as QueryFilterObject, J as interpreterImpl, K as include, L as TopLevelFilterExpression,
|
|
1
|
+
import { $ as prefixRegex, B as exactRegex, F as FilterExpressionKind, G as importerId, H as exprInterpreter, I as QueryFilterObject, J as interpreterImpl, K as include, L as TopLevelFilterExpression, P as FilterExpression, Q as or, R as and, U as filterVitePlugins, V as exclude, W as id, X as moduleType, Y as makeIdFiltersToMatchWithQuery, Z as not, _ as HookFilterExtension, et as queries, j as RolldownPluginOption, q as interpreter, tt as query, z as code } from "./shared/define-config-CJTbYTo8.mjs";
|
|
2
|
+
import { s as StringOrRegExp } from "./shared/utils-CEyV6qve.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/with-filter.d.ts
|
|
5
|
+
type OverrideFilterObject = {
|
|
6
|
+
transform?: HookFilterExtension<"transform">["filter"];
|
|
7
|
+
resolveId?: HookFilterExtension<"resolveId">["filter"];
|
|
8
|
+
load?: HookFilterExtension<"load">["filter"];
|
|
9
|
+
pluginNamePattern?: StringOrRegExp[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A helper function to add plugin hook filters to a plugin or an array of plugins.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import yaml from '@rollup/plugin-yaml';
|
|
17
|
+
* import { defineConfig } from 'rolldown';
|
|
18
|
+
* import { withFilter } from 'rolldown/filter';
|
|
19
|
+
*
|
|
20
|
+
* export default defineConfig({
|
|
21
|
+
* plugins: [
|
|
22
|
+
* // Run the transform hook of the `yaml` plugin
|
|
23
|
+
* // only for modules which end in `.yaml`
|
|
24
|
+
* withFilter(
|
|
25
|
+
* yaml({}),
|
|
26
|
+
* { transform: { id: /\.yaml$/ } },
|
|
27
|
+
* ),
|
|
28
|
+
* ],
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @category Config
|
|
33
|
+
*/
|
|
34
|
+
declare function withFilter<A, T extends RolldownPluginOption<A>>(pluginOption: T, filterObject: OverrideFilterObject | OverrideFilterObject[]): T;
|
|
35
|
+
//#endregion
|
|
2
36
|
export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query, withFilter };
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-
|
|
2
|
-
import { a as validateOption, c as arraify, l as
|
|
3
|
-
import { t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
1
|
+
import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-Ccke9UdD.js";
|
|
2
|
+
import { a as validateOption, c as arraify, l as VERSION, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild } from "./rolldown-build-C-ytNE9x.js";
|
|
3
|
+
import { t as aggregateBindingErrorsIntoJsError } from "./error-DXre1AuB.js";
|
|
4
4
|
import { BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
5
|
+
//#region src/constants/index.ts
|
|
6
|
+
/**
|
|
7
|
+
* Runtime helper module ID
|
|
8
|
+
*/
|
|
9
|
+
const RUNTIME_MODULE_ID = "\0rolldown/runtime.js";
|
|
10
|
+
//#endregion
|
|
5
11
|
//#region src/api/rolldown/index.ts
|
|
6
12
|
/**
|
|
7
13
|
* The API compatible with Rollup's `rollup` function.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as PreRenderedChunk } from "./shared/binding-
|
|
1
|
+
import { z as PreRenderedChunk } from "./shared/binding-BlEEMlGM.mjs";
|
|
2
2
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-BSNejiLS.mjs";
|
|
3
|
-
import { $t as CodeSplittingOptions, A as
|
|
4
|
-
import { o as PartialNull } from "./shared/utils-
|
|
5
|
-
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 };
|
|
3
|
+
import { $t as CodeSplittingOptions, A as RolldownPlugin, At as NormalizedInputOptions, Bt as WatchOptions, C as ParallelPluginHooks, Ct as ModuleTypeFilter, D as ResolveIdExtraOptions, Dt as RolldownFsModule, E as PluginMeta, Et as RolldownFileStats, Ft as RolldownMagicString, Gt as AddonFunction, Ht as RolldownBuild, It as watch, Jt as BuiltinModuleTag, Kt as AdvancedChunksGroup, Lt as RolldownWatcher, M as SourceDescription, Mt as ChecksOptions, N as TransformResult, Nt as LoggingFunction, O as ResolveIdResult, Ot as InternalModuleFormat, Pt as WarningHandlerWithDefault, Qt as CodeSplittingNameFunction, Rt as RolldownWatcherEvent, S as ObjectHook, St as HookFilter, T as Plugin, Tt as RolldownDirectoryEntry, Ut as BuildOptions, Vt as rolldown, Wt as build, Xt as ChunkingContext, Yt as ChunkFileNamesFunction, Zt as CodeSplittingGroup, _ as HookFilterExtension, _t as DefineParallelPluginResult, a as ChunkOptimizationOptions, an as ModuleFormat, at as ExistingRawSourceMap, b as ModuleOptions, bt as PluginContextMeta, c as InputOption, cn as OutputAsset, ct as TreeshakingOptions, d as OptimizationOptions, dn as RenderedModule, dt as EmittedChunk, en as CommentsOptions, f as WatcherFileWatcherOptions, fn as RolldownOutput, ft as EmittedFile, g as FunctionPluginHooks, gn as SourcemapIgnoreListOption, gt as PluginContextResolveOptions, h as CustomPluginOptions, hn as ModuleInfo, ht as PluginContext, i as RolldownOptions, in as MinifyOptions, it as BundleError, j as RolldownPluginOption, jt as TransformOptions, k as ResolvedId, kt as NormalizedOutputOptions, l as InputOptions, ln as OutputChunk, lt as TransformPluginContext, m as AsyncPluginHooks, mt as GetModuleInfo, n as RolldownOptionsFunction, nn as GeneratedCodePreset, nt as RUNTIME_MODULE_ID, o as ExternalOption, on as OutputOptions, ot as SourceMapInput, p as WatcherOptions, pn as SourceMap, pt as EmittedPrebuiltChunk, qt as AdvancedChunksOptions, r as defineConfig, rn as GlobalsFunction, rt as VERSION, s as ExternalOptionFunction, sn as PreRenderedAsset, st as OutputBundle, t as ConfigExport, tn as GeneratedCodeOptions, u as ModuleTypes, un as RenderedChunk, ut as EmittedAsset, v as ImportKind, w as PartialResolvedId, wt as BufferEncoding, x as ModuleType, xt as GeneralHookFilter, y as LoadResult, yt as MinimalPluginContext, zt as RolldownWatcherWatcherEventMap } from "./shared/define-config-CJTbYTo8.mjs";
|
|
4
|
+
import { o as PartialNull } from "./shared/utils-CEyV6qve.mjs";
|
|
5
|
+
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 PluginMeta, 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,6 +1,6 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import { b as
|
|
3
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-WLd1o3am.mjs";
|
|
2
|
+
import { b as VERSION, r as RolldownMagicString } from "./shared/bindingify-input-options-CwvtdwoA.mjs";
|
|
3
|
+
import { t as rolldown } from "./shared/rolldown-q16hbH0c.mjs";
|
|
4
4
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
5
5
|
import { isMainThread } from "node:worker_threads";
|
|
6
6
|
import { initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
|
|
@@ -12,6 +12,12 @@ if (isMainThread) {
|
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
+
//#region src/constants/index.ts
|
|
16
|
+
/**
|
|
17
|
+
* Runtime helper module ID
|
|
18
|
+
*/
|
|
19
|
+
const RUNTIME_MODULE_ID = "\0rolldown/runtime.js";
|
|
20
|
+
//#endregion
|
|
15
21
|
//#region src/api/build.ts
|
|
16
22
|
/**
|
|
17
23
|
* The API similar to esbuild's `build` function.
|
package/dist/{normalize-string-or-regex-A9UIvc9j.js → normalize-string-or-regex-Ccke9UdD.js}
RENAMED
|
@@ -98,7 +98,13 @@ function locate(source, search, options) {
|
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region src/log/logs.ts
|
|
101
|
-
const INVALID_LOG_POSITION = "INVALID_LOG_POSITION"
|
|
101
|
+
const INVALID_LOG_POSITION = "INVALID_LOG_POSITION";
|
|
102
|
+
const PLUGIN_ERROR = "PLUGIN_ERROR";
|
|
103
|
+
const INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN";
|
|
104
|
+
const CYCLE_LOADING = "CYCLE_LOADING";
|
|
105
|
+
const MULTIPLE_WATCHER_OPTION = "MULTIPLE_WATCHER_OPTION";
|
|
106
|
+
const PARSE_ERROR = "PARSE_ERROR";
|
|
107
|
+
const NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER";
|
|
102
108
|
function logParseError(message, id, pos) {
|
|
103
109
|
return {
|
|
104
110
|
code: PARSE_ERROR,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as PluginContextData, n as bindingifyPlugin } from "./shared/bindingify-input-options-
|
|
1
|
+
import { i as PluginContextData, n as bindingifyPlugin } from "./shared/bindingify-input-options-CwvtdwoA.mjs";
|
|
2
2
|
import { parentPort, workerData } from "node:worker_threads";
|
|
3
3
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
4
4
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Plugin } from "./shared/define-config-
|
|
2
|
-
import { i as MaybePromise } from "./shared/utils-
|
|
1
|
+
import { T as Plugin } from "./shared/define-config-CJTbYTo8.mjs";
|
|
2
|
+
import { i as MaybePromise } from "./shared/utils-CEyV6qve.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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
1
|
+
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-ZGEh6uhb.mjs";
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-zUvsghAI.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);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./constructors-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-Ccke9UdD.js";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./constructors-Byrk1_73.js";
|
|
3
3
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
4
|
/**
|
|
5
5
|
* Replaces targeted strings in files while bundling.
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as BindingReplacePluginConfig } from "./shared/binding-
|
|
2
|
-
import { t as BuiltinPlugin } from "./shared/utils-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { m as BindingReplacePluginConfig } from "./shared/binding-BlEEMlGM.mjs";
|
|
2
|
+
import { t as BuiltinPlugin } from "./shared/utils-CEyV6qve.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-CxRN1nW0.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-D93Gs8X1.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-BahhbY0t.mjs";
|
|
3
3
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
4
|
/**
|
|
5
5
|
* Replaces targeted strings in files while bundling.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-
|
|
1
|
+
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-DXre1AuB.js";
|
|
2
2
|
import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync, resolveTsconfig } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
//#region src/utils/minify.ts
|
|
4
4
|
/**
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
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-Ccke9UdD.js";
|
|
2
|
+
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-DXre1AuB.js";
|
|
3
3
|
import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
5
5
|
let _lazyMatch = () => {
|
|
@@ -454,13 +454,7 @@ const win32 = /* @__PURE__ */ mix(";");
|
|
|
454
454
|
*
|
|
455
455
|
* @category Plugin APIs
|
|
456
456
|
*/
|
|
457
|
-
const VERSION = "1.1.
|
|
458
|
-
//#endregion
|
|
459
|
-
//#region src/constants/index.ts
|
|
460
|
-
/**
|
|
461
|
-
* Runtime helper module ID
|
|
462
|
-
*/
|
|
463
|
-
const RUNTIME_MODULE_ID = "\0rolldown/runtime.js";
|
|
457
|
+
const VERSION = "1.1.5";
|
|
464
458
|
//#endregion
|
|
465
459
|
//#region src/utils/misc.ts
|
|
466
460
|
function arraify(value) {
|
|
@@ -1989,6 +1983,7 @@ const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
|
|
|
1989
1983
|
function: /* @__PURE__ */ boolean(),
|
|
1990
1984
|
class: /* @__PURE__ */ boolean()
|
|
1991
1985
|
})])),
|
|
1986
|
+
reserved: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1992
1987
|
debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1993
1988
|
})])),
|
|
1994
1989
|
codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
@@ -2196,6 +2191,7 @@ const OutputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
|
2196
2191
|
/* @__PURE__ */ literal("hidden")
|
|
2197
2192
|
])), /* @__PURE__ */ description(`Generate sourcemap (\`-s inline\` for inline, or \`-s\` for \`.map\` file)`)),
|
|
2198
2193
|
sourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Base URL used to prefix sourcemap paths")),
|
|
2194
|
+
sourcemapFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ChunkFileNamesSchema), /* @__PURE__ */ description("Name pattern for emitted sourcemaps")),
|
|
2199
2195
|
sourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inject sourcemap debug IDs")),
|
|
2200
2196
|
sourcemapExcludeSources: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Exclude source content from sourcemaps")),
|
|
2201
2197
|
sourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
@@ -2269,7 +2265,7 @@ const OutputCliOverrideSchema = /* @__PURE__ */ strictObject({
|
|
|
2269
2265
|
codeSplitting: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
2270
2266
|
minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
|
|
2271
2267
|
minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
|
|
2272
|
-
})])), /* @__PURE__ */ description("Code splitting options
|
|
2268
|
+
})])), /* @__PURE__ */ description("Code splitting options. Enabled by default; use `--no-codeSplitting` to disable, or `--codeSplitting.minSize` / `--codeSplitting.minShareCount` to configure")),
|
|
2273
2269
|
advancedChunks: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
2274
2270
|
minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
|
|
2275
2271
|
minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
|
|
@@ -2441,7 +2437,7 @@ function bindingAssetSource(source) {
|
|
|
2441
2437
|
return { inner: source };
|
|
2442
2438
|
}
|
|
2443
2439
|
//#endregion
|
|
2444
|
-
//#region \0@oxc-project+runtime@0.
|
|
2440
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/decorate.js
|
|
2445
2441
|
function __decorate(decorators, target, key, desc) {
|
|
2446
2442
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2447
2443
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2878,6 +2874,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
2878
2874
|
get sourcemap() {
|
|
2879
2875
|
return this.inner.sourcemap;
|
|
2880
2876
|
}
|
|
2877
|
+
get sourcemapFileNames() {
|
|
2878
|
+
return this.inner.sourcemapFilenames || this.outputOptions.sourcemapFileNames;
|
|
2879
|
+
}
|
|
2881
2880
|
get sourcemapBaseUrl() {
|
|
2882
2881
|
return this.inner.sourcemapBaseUrl ?? void 0;
|
|
2883
2882
|
}
|
|
@@ -2999,6 +2998,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "assetFileNames",
|
|
|
2999
2998
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "format", null);
|
|
3000
2999
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "exports", null);
|
|
3001
3000
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemap", null);
|
|
3001
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapFileNames", null);
|
|
3002
3002
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapBaseUrl", null);
|
|
3003
3003
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "shimMissingExports", null);
|
|
3004
3004
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "name", null);
|
|
@@ -5070,7 +5070,7 @@ const logger = createConsola({ formatOptions: { date: false } });
|
|
|
5070
5070
|
//#endregion
|
|
5071
5071
|
//#region src/utils/bindingify-output-options.ts
|
|
5072
5072
|
function bindingifyOutputOptions(outputOptions, pluginContextData) {
|
|
5073
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapExcludeSources, 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;
|
|
5073
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapFileNames, sourcemapExcludeSources, 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;
|
|
5074
5074
|
if (legalComments != null) logger.warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
|
|
5075
5075
|
const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks, pluginContextData);
|
|
5076
5076
|
return {
|
|
@@ -5082,6 +5082,7 @@ function bindingifyOutputOptions(outputOptions, pluginContextData) {
|
|
|
5082
5082
|
sourcemap: bindingifySourcemap(sourcemap),
|
|
5083
5083
|
sourcemapBaseUrl,
|
|
5084
5084
|
sourcemapDebugIds,
|
|
5085
|
+
sourcemapFileNames,
|
|
5085
5086
|
sourcemapExcludeSources,
|
|
5086
5087
|
sourcemapIgnoreList: sourcemapIgnoreList ?? /node_modules/,
|
|
5087
5088
|
sourcemapPathTransform,
|
|
@@ -5360,4 +5361,4 @@ var RolldownBuild = class RolldownBuild {
|
|
|
5360
5361
|
}
|
|
5361
5362
|
};
|
|
5362
5363
|
//#endregion
|
|
5363
|
-
export { validateOption as a, arraify as c, transformToRollupOutput as i,
|
|
5364
|
+
export { validateOption as a, arraify as c, transformToRollupOutput as i, VERSION as l, createBundlerOptions as n, PluginDriver as o, RolldownMagicString as r, LOG_LEVEL_WARN as s, RolldownBuild as t };
|
|
@@ -32,7 +32,7 @@ interface BindingIdentifier extends Span$1 {
|
|
|
32
32
|
decorators?: [];
|
|
33
33
|
name: string;
|
|
34
34
|
optional?: false;
|
|
35
|
-
typeAnnotation?: null;
|
|
35
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
36
36
|
parent?: Node;
|
|
37
37
|
}
|
|
38
38
|
interface LabelIdentifier extends Span$1 {
|
|
@@ -445,7 +445,7 @@ interface ObjectPattern extends Span$1 {
|
|
|
445
445
|
decorators?: [];
|
|
446
446
|
properties: Array<BindingProperty | BindingRestElement>;
|
|
447
447
|
optional?: false;
|
|
448
|
-
typeAnnotation?: null;
|
|
448
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
449
449
|
parent?: Node;
|
|
450
450
|
}
|
|
451
451
|
interface BindingProperty extends Span$1 {
|
|
@@ -464,7 +464,7 @@ interface ArrayPattern extends Span$1 {
|
|
|
464
464
|
decorators?: [];
|
|
465
465
|
elements: Array<BindingPattern | BindingRestElement | null>;
|
|
466
466
|
optional?: false;
|
|
467
|
-
typeAnnotation?: null;
|
|
467
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
468
468
|
parent?: Node;
|
|
469
469
|
}
|
|
470
470
|
interface BindingRestElement extends Span$1 {
|
|
@@ -472,7 +472,7 @@ interface BindingRestElement extends Span$1 {
|
|
|
472
472
|
decorators?: [];
|
|
473
473
|
argument: BindingPattern;
|
|
474
474
|
optional?: false;
|
|
475
|
-
typeAnnotation?: null;
|
|
475
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
476
476
|
value?: null;
|
|
477
477
|
parent?: Node;
|
|
478
478
|
}
|
|
@@ -1420,6 +1420,17 @@ interface MangleOptions {
|
|
|
1420
1420
|
* @default false
|
|
1421
1421
|
*/
|
|
1422
1422
|
keepNames?: boolean | MangleOptionsKeepNames;
|
|
1423
|
+
/**
|
|
1424
|
+
* Names that bindings must not be renamed to, and that bindings already
|
|
1425
|
+
* carrying them keep. Equivalent to terser's `mangle.reserved`.
|
|
1426
|
+
*
|
|
1427
|
+
* Pass `['exports', 'module']` when minifying prebuilt CommonJS / UMD files
|
|
1428
|
+
* that Node consumers `import` directly, so Node's cjs-module-lexer can still
|
|
1429
|
+
* detect the mangled module's named exports.
|
|
1430
|
+
*
|
|
1431
|
+
* @default []
|
|
1432
|
+
*/
|
|
1433
|
+
reserved?: Array<string>;
|
|
1423
1434
|
/** Debug mangled names. */
|
|
1424
1435
|
debug?: boolean;
|
|
1425
1436
|
}
|
|
@@ -2670,6 +2681,7 @@ declare class BindingNormalizedOptions {
|
|
|
2670
2681
|
get name(): string | null;
|
|
2671
2682
|
get entryFilenames(): string | undefined;
|
|
2672
2683
|
get chunkFilenames(): string | undefined;
|
|
2684
|
+
get sourcemapFilenames(): string | undefined;
|
|
2673
2685
|
get assetFilenames(): string | undefined;
|
|
2674
2686
|
get dir(): string | null;
|
|
2675
2687
|
get file(): string | null;
|
package/dist/shared/{bindingify-input-options-DrP86yzF.mjs → bindingify-input-options-CwvtdwoA.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-
|
|
2
|
-
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-ZGEh6uhb.mjs";
|
|
2
|
+
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-D93Gs8X1.mjs";
|
|
3
3
|
import { C as unreachable, h as or, i as exclude, l as include, n as code, p as moduleType, s as id, t as and, w as unsupported, x as noop, y as arraify } from "./filter-B_mD-HGz-Cbrk-2bt.mjs";
|
|
4
4
|
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-B5cMIevi.mjs";
|
|
5
5
|
import { parseAst } from "../parse-ast-index.mjs";
|
|
@@ -7,7 +7,7 @@ import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, Bin
|
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fsp from "node:fs/promises";
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "1.1.
|
|
10
|
+
var version = "1.1.5";
|
|
11
11
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/constants/version.ts
|
|
@@ -19,12 +19,6 @@ var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compat
|
|
|
19
19
|
*/
|
|
20
20
|
const VERSION = version;
|
|
21
21
|
//#endregion
|
|
22
|
-
//#region src/constants/index.ts
|
|
23
|
-
/**
|
|
24
|
-
* Runtime helper module ID
|
|
25
|
-
*/
|
|
26
|
-
const RUNTIME_MODULE_ID = "\0rolldown/runtime.js";
|
|
27
|
-
//#endregion
|
|
28
22
|
//#region src/log/logging.ts
|
|
29
23
|
const LOG_LEVEL_SILENT = "silent";
|
|
30
24
|
const LOG_LEVEL_ERROR = "error";
|
|
@@ -218,7 +212,7 @@ function bindingAssetSource(source) {
|
|
|
218
212
|
return { inner: source };
|
|
219
213
|
}
|
|
220
214
|
//#endregion
|
|
221
|
-
//#region \0@oxc-project+runtime@0.
|
|
215
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/decorate.js
|
|
222
216
|
function __decorate(decorators, target, key, desc) {
|
|
223
217
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
224
218
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -631,6 +625,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
631
625
|
get sourcemap() {
|
|
632
626
|
return this.inner.sourcemap;
|
|
633
627
|
}
|
|
628
|
+
get sourcemapFileNames() {
|
|
629
|
+
return this.inner.sourcemapFilenames || this.outputOptions.sourcemapFileNames;
|
|
630
|
+
}
|
|
634
631
|
get sourcemapBaseUrl() {
|
|
635
632
|
return this.inner.sourcemapBaseUrl ?? void 0;
|
|
636
633
|
}
|
|
@@ -752,6 +749,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "assetFileNames",
|
|
|
752
749
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "format", null);
|
|
753
750
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "exports", null);
|
|
754
751
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemap", null);
|
|
752
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapFileNames", null);
|
|
755
753
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapBaseUrl", null);
|
|
756
754
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "shimMissingExports", null);
|
|
757
755
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "name", null);
|
|
@@ -2235,4 +2233,4 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
2235
2233
|
};
|
|
2236
2234
|
}
|
|
2237
2235
|
//#endregion
|
|
2238
|
-
export { version as
|
|
2236
|
+
export { version as S, LOG_LEVEL_INFO as _, transformModuleInfo as a, VERSION as b, __decorate as c, PlainObjectLike as d, MinimalPluginContextImpl as f, LOG_LEVEL_ERROR as g, LOG_LEVEL_DEBUG as h, PluginContextData as i, transformAssetSource as l, normalizeLog as m, bindingifyPlugin as n, transformToRollupOutput as o, normalizeHook as p, RolldownMagicString as r, transformRenderedChunk as s, bindingifyInputOptions as t, lazyProp as u, LOG_LEVEL_WARN as v, description as x, logLevelPriority as y };
|
|
@@ -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-D93Gs8X1.mjs";
|
|
2
2
|
//#region src/builtin-plugin/constructors.ts
|
|
3
3
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
4
4
|
return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-
|
|
2
|
-
import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-
|
|
1
|
+
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-BlEEMlGM.mjs";
|
|
2
|
+
import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-CEyV6qve.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|