@rolldown/browser 1.0.0-beta.21 → 1.0.0-beta.22
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.cjs +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +2 -2
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +1 -1
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.mjs +1 -1
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/rolldown-binding.wasi-browser.js +1 -0
- package/dist/rolldown-binding.wasi.cjs +1 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding--Ro_HG7S.d.mts → binding-B8kHDLfO.d.mts} +15 -1
- package/dist/shared/{binding-DBnJxycu.d.cts → binding-CbR_BHh9.d.cts} +15 -1
- package/dist/shared/{define-config-3jyxkSn6.d.mts → define-config-DZVEpUTF.d.cts} +31 -21
- package/dist/shared/{define-config-LuFmoc43.d.cts → define-config-DsN80oVh.d.mts} +31 -21
- package/dist/shared/{load-config--g9e2MRO.cjs → load-config-BgXwAVNp.cjs} +1 -1
- package/dist/shared/{load-config-DnUMpIsk.mjs → load-config-_2H4hlKT.mjs} +1 -1
- package/dist/shared/{src-DLhNmBff.mjs → src-C_vfq91X.mjs} +49 -9
- package/dist/shared/{src-B3ZW8_Y7.cjs → src-DT8g8X-x.cjs} +49 -9
- package/dist/{src-jKfrtJ37.js → src-DJeuVN_z.js} +49 -9
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DT8g8X-x.cjs');
|
|
3
3
|
const require_dist = require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-CGTVCgvx.cjs');
|
|
5
|
-
const require_load_config = require('./shared/load-config
|
|
5
|
+
const require_load_config = require('./shared/load-config-BgXwAVNp.cjs');
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
7
7
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
8
8
|
const node_util = require_chunk.__toESM(require("node:util"));
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
1
|
+
import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-C_vfq91X.mjs";
|
|
2
2
|
import { arraify } from "./shared/dist-BoWaIc-K.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-BzdtcWzA.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-_2H4hlKT.mjs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
6
6
|
import process$1 from "node:process";
|
|
7
7
|
import { formatWithOptions, parseArgs } from "node:util";
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-DT8g8X-x.cjs');
|
|
2
2
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
3
3
|
require('./shared/parse-ast-index-CGTVCgvx.cjs');
|
|
4
|
-
const require_load_config = require('./shared/load-config
|
|
4
|
+
const require_load_config = require('./shared/load-config-BgXwAVNp.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = require_src.version;
|
package/dist/config.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CbR_BHh9.cjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-DZVEpUTF.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-B8kHDLfO.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-DsN80oVh.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineConfig, version } from "./shared/src-
|
|
1
|
+
import { defineConfig, version } from "./shared/src-C_vfq91X.mjs";
|
|
2
2
|
import "./shared/dist-BoWaIc-K.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-BzdtcWzA.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-_2H4hlKT.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-DJeuVN_z.js";
|
|
2
2
|
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DT8g8X-x.cjs');
|
|
3
3
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-CGTVCgvx.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-CbR_BHh9.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-DZVEpUTF.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding
|
|
2
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-B8kHDLfO.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-DsN80oVh.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-C_vfq91X.mjs";
|
|
2
2
|
import "./shared/dist-BoWaIc-K.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-BzdtcWzA.mjs";
|
|
4
4
|
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CbR_BHh9.cjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-DZVEpUTF.cjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-B8kHDLfO.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-DsN80oVh.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-CbR_BHh9.cjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-DZVEpUTF.cjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-B8kHDLfO.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-DsN80oVh.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-C_vfq91X.mjs";
|
|
2
2
|
import "./shared/dist-BoWaIc-K.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-BzdtcWzA.mjs";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DT8g8X-x.cjs');
|
|
3
3
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-CGTVCgvx.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-C_vfq91X.mjs";
|
|
2
2
|
import "./shared/dist-BoWaIc-K.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-BzdtcWzA.mjs";
|
|
4
4
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CbR_BHh9.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-DZVEpUTF.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-B8kHDLfO.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-DsN80oVh.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -86,6 +86,7 @@ export const BindingBundleErrorEventData = __napiModule.exports.BindingBundleErr
|
|
|
86
86
|
export const BindingBundler = __napiModule.exports.BindingBundler
|
|
87
87
|
export const BindingBundlerImpl = __napiModule.exports.BindingBundlerImpl
|
|
88
88
|
export const BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallableBuiltinPlugin
|
|
89
|
+
export const BindingChunkingContext = __napiModule.exports.BindingChunkingContext
|
|
89
90
|
export const BindingError = __napiModule.exports.BindingError
|
|
90
91
|
export const BindingHmrOutput = __napiModule.exports.BindingHmrOutput
|
|
91
92
|
export const BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
@@ -110,6 +110,7 @@ module.exports.BindingBundleErrorEventData = __napiModule.exports.BindingBundleE
|
|
|
110
110
|
module.exports.BindingBundler = __napiModule.exports.BindingBundler
|
|
111
111
|
module.exports.BindingBundlerImpl = __napiModule.exports.BindingBundlerImpl
|
|
112
112
|
module.exports.BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallableBuiltinPlugin
|
|
113
|
+
module.exports.BindingChunkingContext = __napiModule.exports.BindingChunkingContext
|
|
113
114
|
module.exports.BindingError = __napiModule.exports.BindingError
|
|
114
115
|
module.exports.BindingHmrOutput = __napiModule.exports.BindingHmrOutput
|
|
115
116
|
module.exports.BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
Binary file
|
|
@@ -1005,6 +1005,9 @@ declare class BindingBundlerImpl {
|
|
|
1005
1005
|
generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>;
|
|
1006
1006
|
hmrInvalidate(file: string, firstInvalidatedBy?: string | undefined | null): Promise<BindingHmrOutput>;
|
|
1007
1007
|
}
|
|
1008
|
+
declare class BindingChunkingContext {
|
|
1009
|
+
getModuleInfo(moduleId: string): BindingModuleInfo | null;
|
|
1010
|
+
}
|
|
1008
1011
|
declare class BindingError {
|
|
1009
1012
|
kind: string;
|
|
1010
1013
|
message: string;
|
|
@@ -1013,6 +1016,16 @@ declare class BindingHmrOutput {
|
|
|
1013
1016
|
get patch(): BindingHmrOutputPatch | null;
|
|
1014
1017
|
get errors(): Array<Error | BindingError>;
|
|
1015
1018
|
}
|
|
1019
|
+
declare class BindingModuleInfo {
|
|
1020
|
+
id: string;
|
|
1021
|
+
importers: Array<string>;
|
|
1022
|
+
dynamicImporters: Array<string>;
|
|
1023
|
+
importedIds: Array<string>;
|
|
1024
|
+
dynamicallyImportedIds: Array<string>;
|
|
1025
|
+
exports: Array<string>;
|
|
1026
|
+
isEntry: boolean;
|
|
1027
|
+
get code(): string | null;
|
|
1028
|
+
}
|
|
1016
1029
|
declare class BindingOutputAsset {
|
|
1017
1030
|
get fileName(): string;
|
|
1018
1031
|
get originalFileName(): string | null;
|
|
@@ -1216,6 +1229,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1216
1229
|
dedupe: Array<string>;
|
|
1217
1230
|
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>;
|
|
1218
1231
|
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>;
|
|
1232
|
+
resolveSubpathImports: (id: string, importer: string, isRequire: boolean, scan: boolean) => VoidNullable<string>;
|
|
1219
1233
|
}
|
|
1220
1234
|
interface BindingViteResolvePluginResolveOptions {
|
|
1221
1235
|
isBuild: boolean;
|
|
@@ -1243,4 +1257,4 @@ interface PreRenderedChunk {
|
|
|
1243
1257
|
exports: Array<string>;
|
|
1244
1258
|
}
|
|
1245
1259
|
//#endregion
|
|
1246
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
1260
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -1005,6 +1005,9 @@ declare class BindingBundlerImpl {
|
|
|
1005
1005
|
generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>;
|
|
1006
1006
|
hmrInvalidate(file: string, firstInvalidatedBy?: string | undefined | null): Promise<BindingHmrOutput>;
|
|
1007
1007
|
}
|
|
1008
|
+
declare class BindingChunkingContext {
|
|
1009
|
+
getModuleInfo(moduleId: string): BindingModuleInfo | null;
|
|
1010
|
+
}
|
|
1008
1011
|
declare class BindingError {
|
|
1009
1012
|
kind: string;
|
|
1010
1013
|
message: string;
|
|
@@ -1013,6 +1016,16 @@ declare class BindingHmrOutput {
|
|
|
1013
1016
|
get patch(): BindingHmrOutputPatch | null;
|
|
1014
1017
|
get errors(): Array<Error | BindingError>;
|
|
1015
1018
|
}
|
|
1019
|
+
declare class BindingModuleInfo {
|
|
1020
|
+
id: string;
|
|
1021
|
+
importers: Array<string>;
|
|
1022
|
+
dynamicImporters: Array<string>;
|
|
1023
|
+
importedIds: Array<string>;
|
|
1024
|
+
dynamicallyImportedIds: Array<string>;
|
|
1025
|
+
exports: Array<string>;
|
|
1026
|
+
isEntry: boolean;
|
|
1027
|
+
get code(): string | null;
|
|
1028
|
+
}
|
|
1016
1029
|
declare class BindingOutputAsset {
|
|
1017
1030
|
get fileName(): string;
|
|
1018
1031
|
get originalFileName(): string | null;
|
|
@@ -1216,6 +1229,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1216
1229
|
dedupe: Array<string>;
|
|
1217
1230
|
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>;
|
|
1218
1231
|
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>;
|
|
1232
|
+
resolveSubpathImports: (id: string, importer: string, isRequire: boolean, scan: boolean) => VoidNullable<string>;
|
|
1219
1233
|
}
|
|
1220
1234
|
interface BindingViteResolvePluginResolveOptions {
|
|
1221
1235
|
isBuild: boolean;
|
|
@@ -1243,4 +1257,4 @@ interface PreRenderedChunk {
|
|
|
1243
1257
|
exports: Array<string>;
|
|
1244
1258
|
}
|
|
1245
1259
|
//#endregion
|
|
1246
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
1260
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-CbR_BHh9.cjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -38,6 +38,29 @@ interface RollupError extends RollupLog {
|
|
|
38
38
|
}
|
|
39
39
|
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
40
40
|
//#endregion
|
|
41
|
+
//#region src/types/module-info.d.ts
|
|
42
|
+
interface ModuleInfo extends ModuleOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Unsupported at rolldown
|
|
45
|
+
*/
|
|
46
|
+
ast: any;
|
|
47
|
+
code: string | null;
|
|
48
|
+
id: string;
|
|
49
|
+
importers: string[];
|
|
50
|
+
dynamicImporters: string[];
|
|
51
|
+
importedIds: string[];
|
|
52
|
+
dynamicallyImportedIds: string[];
|
|
53
|
+
exports: string[];
|
|
54
|
+
isEntry: boolean;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/types/chunking-context.d.ts
|
|
58
|
+
declare class ChunkingContext {
|
|
59
|
+
private context;
|
|
60
|
+
constructor(context: BindingChunkingContext);
|
|
61
|
+
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
41
64
|
//#region src/types/misc.d.ts
|
|
42
65
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
43
66
|
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
@@ -170,7 +193,7 @@ interface OutputOptions {
|
|
|
170
193
|
externalLiveBindings?: boolean;
|
|
171
194
|
inlineDynamicImports?: boolean;
|
|
172
195
|
/**
|
|
173
|
-
* - Type: `((moduleId: string) => string | NullValue)`
|
|
196
|
+
* - Type: `((moduleId: string, meta: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue)`
|
|
174
197
|
* - Object form is not supported.
|
|
175
198
|
*
|
|
176
199
|
* :::warning
|
|
@@ -213,7 +236,9 @@ interface OutputOptions {
|
|
|
213
236
|
*
|
|
214
237
|
* @deprecated Please use `advancedChunks` instead.
|
|
215
238
|
*/
|
|
216
|
-
manualChunks?: (moduleId: string, meta: {
|
|
239
|
+
manualChunks?: (moduleId: string, meta: {
|
|
240
|
+
getModuleInfo: (moduleId: string) => ModuleInfo | null;
|
|
241
|
+
}) => string | NullValue;
|
|
217
242
|
/**
|
|
218
243
|
* Allows you to do manual chunking. For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/guide/in-depth/advanced-chunks).
|
|
219
244
|
*/
|
|
@@ -253,7 +278,7 @@ interface OutputOptions {
|
|
|
253
278
|
*/
|
|
254
279
|
groups?: {
|
|
255
280
|
/**
|
|
256
|
-
* - Type: `string | ((moduleId: string) => string | NullValue)`
|
|
281
|
+
* - Type: `string | ((moduleId: string, ctx: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue)`
|
|
257
282
|
*
|
|
258
283
|
* Name of the group. It will be also used as the name of the chunk and replaced the `[name]` placeholder in the `chunkFileNames` option.
|
|
259
284
|
*
|
|
@@ -304,7 +329,7 @@ interface OutputOptions {
|
|
|
304
329
|
* Constraints like `minSize`, `maxSize`, etc. are applied separately for different names returned by the function.
|
|
305
330
|
* :::
|
|
306
331
|
*/
|
|
307
|
-
name: string | ((moduleId: string) => string | NullValue);
|
|
332
|
+
name: string | ((moduleId: string, ctx: ChunkingContext) => string | NullValue);
|
|
308
333
|
/**
|
|
309
334
|
* - Type: `string | RegExp | ((id: string) => boolean | undefined | void);`
|
|
310
335
|
*
|
|
@@ -618,22 +643,6 @@ type ParallelPlugin = {
|
|
|
618
643
|
type DefineParallelPluginResult<Options> = (options: Options) => ParallelPlugin;
|
|
619
644
|
declare function defineParallelPlugin<Options>(pluginPath: string): DefineParallelPluginResult<Options>;
|
|
620
645
|
//#endregion
|
|
621
|
-
//#region src/types/module-info.d.ts
|
|
622
|
-
interface ModuleInfo extends ModuleOptions {
|
|
623
|
-
/**
|
|
624
|
-
* Unsupported at rolldown
|
|
625
|
-
*/
|
|
626
|
-
ast: any;
|
|
627
|
-
code: string | null;
|
|
628
|
-
id: string;
|
|
629
|
-
importers: string[];
|
|
630
|
-
dynamicImporters: string[];
|
|
631
|
-
importedIds: string[];
|
|
632
|
-
dynamicallyImportedIds: string[];
|
|
633
|
-
exports: string[];
|
|
634
|
-
isEntry: boolean;
|
|
635
|
-
}
|
|
636
|
-
//#endregion
|
|
637
646
|
//#region src/plugin/plugin-context.d.ts
|
|
638
647
|
interface EmittedAsset {
|
|
639
648
|
type: "asset";
|
|
@@ -694,6 +703,7 @@ type TreeshakingOptions = {
|
|
|
694
703
|
annotations?: boolean;
|
|
695
704
|
manualPureFunctions?: string[];
|
|
696
705
|
unknownGlobalSideEffects?: boolean;
|
|
706
|
+
commonjs?: boolean;
|
|
697
707
|
} | boolean;
|
|
698
708
|
//#endregion
|
|
699
709
|
//#region src/types/output-bundle.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-B8kHDLfO.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -38,6 +38,29 @@ interface RollupError extends RollupLog {
|
|
|
38
38
|
}
|
|
39
39
|
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
40
40
|
//#endregion
|
|
41
|
+
//#region src/types/module-info.d.ts
|
|
42
|
+
interface ModuleInfo extends ModuleOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Unsupported at rolldown
|
|
45
|
+
*/
|
|
46
|
+
ast: any;
|
|
47
|
+
code: string | null;
|
|
48
|
+
id: string;
|
|
49
|
+
importers: string[];
|
|
50
|
+
dynamicImporters: string[];
|
|
51
|
+
importedIds: string[];
|
|
52
|
+
dynamicallyImportedIds: string[];
|
|
53
|
+
exports: string[];
|
|
54
|
+
isEntry: boolean;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/types/chunking-context.d.ts
|
|
58
|
+
declare class ChunkingContext {
|
|
59
|
+
private context;
|
|
60
|
+
constructor(context: BindingChunkingContext);
|
|
61
|
+
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
41
64
|
//#region src/types/misc.d.ts
|
|
42
65
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
43
66
|
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
@@ -170,7 +193,7 @@ interface OutputOptions {
|
|
|
170
193
|
externalLiveBindings?: boolean;
|
|
171
194
|
inlineDynamicImports?: boolean;
|
|
172
195
|
/**
|
|
173
|
-
* - Type: `((moduleId: string) => string | NullValue)`
|
|
196
|
+
* - Type: `((moduleId: string, meta: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue)`
|
|
174
197
|
* - Object form is not supported.
|
|
175
198
|
*
|
|
176
199
|
* :::warning
|
|
@@ -213,7 +236,9 @@ interface OutputOptions {
|
|
|
213
236
|
*
|
|
214
237
|
* @deprecated Please use `advancedChunks` instead.
|
|
215
238
|
*/
|
|
216
|
-
manualChunks?: (moduleId: string, meta: {
|
|
239
|
+
manualChunks?: (moduleId: string, meta: {
|
|
240
|
+
getModuleInfo: (moduleId: string) => ModuleInfo | null;
|
|
241
|
+
}) => string | NullValue;
|
|
217
242
|
/**
|
|
218
243
|
* Allows you to do manual chunking. For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/guide/in-depth/advanced-chunks).
|
|
219
244
|
*/
|
|
@@ -253,7 +278,7 @@ interface OutputOptions {
|
|
|
253
278
|
*/
|
|
254
279
|
groups?: {
|
|
255
280
|
/**
|
|
256
|
-
* - Type: `string | ((moduleId: string) => string | NullValue)`
|
|
281
|
+
* - Type: `string | ((moduleId: string, ctx: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue)`
|
|
257
282
|
*
|
|
258
283
|
* Name of the group. It will be also used as the name of the chunk and replaced the `[name]` placeholder in the `chunkFileNames` option.
|
|
259
284
|
*
|
|
@@ -304,7 +329,7 @@ interface OutputOptions {
|
|
|
304
329
|
* Constraints like `minSize`, `maxSize`, etc. are applied separately for different names returned by the function.
|
|
305
330
|
* :::
|
|
306
331
|
*/
|
|
307
|
-
name: string | ((moduleId: string) => string | NullValue);
|
|
332
|
+
name: string | ((moduleId: string, ctx: ChunkingContext) => string | NullValue);
|
|
308
333
|
/**
|
|
309
334
|
* - Type: `string | RegExp | ((id: string) => boolean | undefined | void);`
|
|
310
335
|
*
|
|
@@ -618,22 +643,6 @@ type ParallelPlugin = {
|
|
|
618
643
|
type DefineParallelPluginResult<Options> = (options: Options) => ParallelPlugin;
|
|
619
644
|
declare function defineParallelPlugin<Options>(pluginPath: string): DefineParallelPluginResult<Options>;
|
|
620
645
|
//#endregion
|
|
621
|
-
//#region src/types/module-info.d.ts
|
|
622
|
-
interface ModuleInfo extends ModuleOptions {
|
|
623
|
-
/**
|
|
624
|
-
* Unsupported at rolldown
|
|
625
|
-
*/
|
|
626
|
-
ast: any;
|
|
627
|
-
code: string | null;
|
|
628
|
-
id: string;
|
|
629
|
-
importers: string[];
|
|
630
|
-
dynamicImporters: string[];
|
|
631
|
-
importedIds: string[];
|
|
632
|
-
dynamicallyImportedIds: string[];
|
|
633
|
-
exports: string[];
|
|
634
|
-
isEntry: boolean;
|
|
635
|
-
}
|
|
636
|
-
//#endregion
|
|
637
646
|
//#region src/plugin/plugin-context.d.ts
|
|
638
647
|
interface EmittedAsset {
|
|
639
648
|
type: "asset";
|
|
@@ -694,6 +703,7 @@ type TreeshakingOptions = {
|
|
|
694
703
|
annotations?: boolean;
|
|
695
704
|
manualPureFunctions?: string[];
|
|
696
705
|
unknownGlobalSideEffects?: boolean;
|
|
706
|
+
commonjs?: boolean;
|
|
697
707
|
} | boolean;
|
|
698
708
|
//#endregion
|
|
699
709
|
//#region src/types/output-bundle.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-DT8g8X-x.cjs');
|
|
3
3
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
4
4
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
5
5
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
@@ -33,7 +33,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region package.json
|
|
36
|
-
var version = "1.0.0-beta.
|
|
36
|
+
var version = "1.0.0-beta.22";
|
|
37
37
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
@@ -2124,7 +2124,8 @@ const ResolveOptionsSchema = strictObject({
|
|
|
2124
2124
|
const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
2125
2125
|
annotations: optional(boolean()),
|
|
2126
2126
|
manualPureFunctions: optional(array(string())),
|
|
2127
|
-
unknownGlobalSideEffects: optional(boolean())
|
|
2127
|
+
unknownGlobalSideEffects: optional(boolean()),
|
|
2128
|
+
commonjs: optional(boolean())
|
|
2128
2129
|
})]);
|
|
2129
2130
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
2130
2131
|
LogLevelSchema,
|
|
@@ -2783,9 +2784,14 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2783
2784
|
async resolve(source, importer, options) {
|
|
2784
2785
|
let receipt = void 0;
|
|
2785
2786
|
if (options != null) receipt = this.data.saveResolveOptions(options);
|
|
2787
|
+
const vitePluginCustom = Object.entries(options?.custom ?? {}).reduce((acc, [key, value]) => {
|
|
2788
|
+
if (key.startsWith("vite:")) (acc ??= {})[key] = value;
|
|
2789
|
+
return acc;
|
|
2790
|
+
}, void 0);
|
|
2786
2791
|
const res = await this.context.resolve(source, importer, {
|
|
2787
2792
|
custom: receipt,
|
|
2788
|
-
skipSelf: options?.skipSelf
|
|
2793
|
+
skipSelf: options?.skipSelf,
|
|
2794
|
+
vitePluginCustom
|
|
2789
2795
|
});
|
|
2790
2796
|
if (receipt != null) this.data.removeSavedResolveOptions(receipt);
|
|
2791
2797
|
if (res == null) return null;
|
|
@@ -3027,6 +3033,25 @@ function bindingifyModuleParsed(args$1) {
|
|
|
3027
3033
|
};
|
|
3028
3034
|
}
|
|
3029
3035
|
|
|
3036
|
+
//#endregion
|
|
3037
|
+
//#region src/types/chunking-context.ts
|
|
3038
|
+
var ChunkingContext = class {
|
|
3039
|
+
constructor(context) {
|
|
3040
|
+
this.context = context;
|
|
3041
|
+
}
|
|
3042
|
+
getModuleInfo(moduleId) {
|
|
3043
|
+
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
3044
|
+
if (bindingInfo) {
|
|
3045
|
+
const info = transformModuleInfo(bindingInfo, {
|
|
3046
|
+
moduleSideEffects: null,
|
|
3047
|
+
meta: {}
|
|
3048
|
+
});
|
|
3049
|
+
return info;
|
|
3050
|
+
}
|
|
3051
|
+
return null;
|
|
3052
|
+
}
|
|
3053
|
+
};
|
|
3054
|
+
|
|
3030
3055
|
//#endregion
|
|
3031
3056
|
//#region src/utils/transform-rendered-module.ts
|
|
3032
3057
|
function transformToRenderedModule(bindingRenderedModule) {
|
|
@@ -3096,11 +3121,7 @@ function transformChunkModules(modules) {
|
|
|
3096
3121
|
//#region src/utils/bindingify-output-options.ts
|
|
3097
3122
|
function bindingifyOutputOptions(outputOptions) {
|
|
3098
3123
|
const { dir, format, exports, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks } = outputOptions;
|
|
3099
|
-
|
|
3100
|
-
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3101
|
-
else if (manualChunks != null) advancedChunks = { groups: [{ name(id$1) {
|
|
3102
|
-
return manualChunks(id$1, {});
|
|
3103
|
-
} }] };
|
|
3124
|
+
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3104
3125
|
return {
|
|
3105
3126
|
dir,
|
|
3106
3127
|
file: file == null ? void 0 : file,
|
|
@@ -3180,6 +3201,24 @@ function bindingifyAssetFilenames(assetFileNames) {
|
|
|
3180
3201
|
};
|
|
3181
3202
|
return assetFileNames;
|
|
3182
3203
|
}
|
|
3204
|
+
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
3205
|
+
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3206
|
+
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
3207
|
+
return manualChunks(moduleId, { getModuleInfo: (id$1) => ctx.getModuleInfo(id$1) });
|
|
3208
|
+
} }] };
|
|
3209
|
+
if (advancedChunks == null) return void 0;
|
|
3210
|
+
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
3211
|
+
return {
|
|
3212
|
+
...restAdvancedChunks,
|
|
3213
|
+
groups: groups?.map((group) => {
|
|
3214
|
+
const { name,...restGroup } = group;
|
|
3215
|
+
return {
|
|
3216
|
+
...restGroup,
|
|
3217
|
+
name: typeof name === "function" ? (id$1, ctx) => name(id$1, new ChunkingContext(ctx)) : name
|
|
3218
|
+
};
|
|
3219
|
+
})
|
|
3220
|
+
};
|
|
3221
|
+
}
|
|
3183
3222
|
|
|
3184
3223
|
//#endregion
|
|
3185
3224
|
//#region src/options/normalized-output-options.ts
|
|
@@ -4085,7 +4124,8 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
4085
4124
|
moduleSideEffects: true,
|
|
4086
4125
|
annotations: config.annotations,
|
|
4087
4126
|
manualPureFunctions: config.manualPureFunctions,
|
|
4088
|
-
unknownGlobalSideEffects: config.unknownGlobalSideEffects
|
|
4127
|
+
unknownGlobalSideEffects: config.unknownGlobalSideEffects,
|
|
4128
|
+
commonjs: config.commonjs
|
|
4089
4129
|
};
|
|
4090
4130
|
if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
|
|
4091
4131
|
else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
|
|
@@ -8,7 +8,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
8
8
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.
|
|
11
|
+
var version = "1.0.0-beta.22";
|
|
12
12
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
@@ -2099,7 +2099,8 @@ const ResolveOptionsSchema = strictObject({
|
|
|
2099
2099
|
const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
2100
2100
|
annotations: optional(boolean()),
|
|
2101
2101
|
manualPureFunctions: optional(array(string())),
|
|
2102
|
-
unknownGlobalSideEffects: optional(boolean())
|
|
2102
|
+
unknownGlobalSideEffects: optional(boolean()),
|
|
2103
|
+
commonjs: optional(boolean())
|
|
2103
2104
|
})]);
|
|
2104
2105
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
2105
2106
|
LogLevelSchema,
|
|
@@ -2758,9 +2759,14 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2758
2759
|
async resolve(source, importer, options) {
|
|
2759
2760
|
let receipt = void 0;
|
|
2760
2761
|
if (options != null) receipt = this.data.saveResolveOptions(options);
|
|
2762
|
+
const vitePluginCustom = Object.entries(options?.custom ?? {}).reduce((acc, [key, value]) => {
|
|
2763
|
+
if (key.startsWith("vite:")) (acc ??= {})[key] = value;
|
|
2764
|
+
return acc;
|
|
2765
|
+
}, void 0);
|
|
2761
2766
|
const res = await this.context.resolve(source, importer, {
|
|
2762
2767
|
custom: receipt,
|
|
2763
|
-
skipSelf: options?.skipSelf
|
|
2768
|
+
skipSelf: options?.skipSelf,
|
|
2769
|
+
vitePluginCustom
|
|
2764
2770
|
});
|
|
2765
2771
|
if (receipt != null) this.data.removeSavedResolveOptions(receipt);
|
|
2766
2772
|
if (res == null) return null;
|
|
@@ -3002,6 +3008,25 @@ function bindingifyModuleParsed(args$1) {
|
|
|
3002
3008
|
};
|
|
3003
3009
|
}
|
|
3004
3010
|
|
|
3011
|
+
//#endregion
|
|
3012
|
+
//#region src/types/chunking-context.ts
|
|
3013
|
+
var ChunkingContext = class {
|
|
3014
|
+
constructor(context) {
|
|
3015
|
+
this.context = context;
|
|
3016
|
+
}
|
|
3017
|
+
getModuleInfo(moduleId) {
|
|
3018
|
+
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
3019
|
+
if (bindingInfo) {
|
|
3020
|
+
const info = transformModuleInfo(bindingInfo, {
|
|
3021
|
+
moduleSideEffects: null,
|
|
3022
|
+
meta: {}
|
|
3023
|
+
});
|
|
3024
|
+
return info;
|
|
3025
|
+
}
|
|
3026
|
+
return null;
|
|
3027
|
+
}
|
|
3028
|
+
};
|
|
3029
|
+
|
|
3005
3030
|
//#endregion
|
|
3006
3031
|
//#region src/utils/transform-rendered-module.ts
|
|
3007
3032
|
function transformToRenderedModule(bindingRenderedModule) {
|
|
@@ -3071,11 +3096,7 @@ function transformChunkModules(modules) {
|
|
|
3071
3096
|
//#region src/utils/bindingify-output-options.ts
|
|
3072
3097
|
function bindingifyOutputOptions(outputOptions) {
|
|
3073
3098
|
const { dir, format, exports: exports$1, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks } = outputOptions;
|
|
3074
|
-
|
|
3075
|
-
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3076
|
-
else if (manualChunks != null) advancedChunks = { groups: [{ name(id$1) {
|
|
3077
|
-
return manualChunks(id$1, {});
|
|
3078
|
-
} }] };
|
|
3099
|
+
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3079
3100
|
return {
|
|
3080
3101
|
dir,
|
|
3081
3102
|
file: file == null ? void 0 : file,
|
|
@@ -3155,6 +3176,24 @@ function bindingifyAssetFilenames(assetFileNames) {
|
|
|
3155
3176
|
};
|
|
3156
3177
|
return assetFileNames;
|
|
3157
3178
|
}
|
|
3179
|
+
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
3180
|
+
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3181
|
+
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
3182
|
+
return manualChunks(moduleId, { getModuleInfo: (id$1) => ctx.getModuleInfo(id$1) });
|
|
3183
|
+
} }] };
|
|
3184
|
+
if (advancedChunks == null) return void 0;
|
|
3185
|
+
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
3186
|
+
return {
|
|
3187
|
+
...restAdvancedChunks,
|
|
3188
|
+
groups: groups?.map((group) => {
|
|
3189
|
+
const { name,...restGroup } = group;
|
|
3190
|
+
return {
|
|
3191
|
+
...restGroup,
|
|
3192
|
+
name: typeof name === "function" ? (id$1, ctx) => name(id$1, new ChunkingContext(ctx)) : name
|
|
3193
|
+
};
|
|
3194
|
+
})
|
|
3195
|
+
};
|
|
3196
|
+
}
|
|
3158
3197
|
|
|
3159
3198
|
//#endregion
|
|
3160
3199
|
//#region src/options/normalized-output-options.ts
|
|
@@ -4060,7 +4099,8 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
4060
4099
|
moduleSideEffects: true,
|
|
4061
4100
|
annotations: config.annotations,
|
|
4062
4101
|
manualPureFunctions: config.manualPureFunctions,
|
|
4063
|
-
unknownGlobalSideEffects: config.unknownGlobalSideEffects
|
|
4102
|
+
unknownGlobalSideEffects: config.unknownGlobalSideEffects,
|
|
4103
|
+
commonjs: config.commonjs
|
|
4064
4104
|
};
|
|
4065
4105
|
if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
|
|
4066
4106
|
else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region package.json
|
|
30
|
-
var version = "1.0.0-beta.
|
|
30
|
+
var version = "1.0.0-beta.22";
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/builtin-plugin/utils.ts
|
|
@@ -2310,7 +2310,8 @@ const ResolveOptionsSchema = strictObject({
|
|
|
2310
2310
|
const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
2311
2311
|
annotations: optional(boolean()),
|
|
2312
2312
|
manualPureFunctions: optional(array(string())),
|
|
2313
|
-
unknownGlobalSideEffects: optional(boolean())
|
|
2313
|
+
unknownGlobalSideEffects: optional(boolean()),
|
|
2314
|
+
commonjs: optional(boolean())
|
|
2314
2315
|
})]);
|
|
2315
2316
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
2316
2317
|
LogLevelSchema,
|
|
@@ -3108,9 +3109,14 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
3108
3109
|
async resolve(source, importer, options) {
|
|
3109
3110
|
let receipt = void 0;
|
|
3110
3111
|
if (options != null) receipt = this.data.saveResolveOptions(options);
|
|
3112
|
+
const vitePluginCustom = Object.entries(options?.custom ?? {}).reduce((acc, [key, value]) => {
|
|
3113
|
+
if (key.startsWith("vite:")) (acc ??= {})[key] = value;
|
|
3114
|
+
return acc;
|
|
3115
|
+
}, void 0);
|
|
3111
3116
|
const res = await this.context.resolve(source, importer, {
|
|
3112
3117
|
custom: receipt,
|
|
3113
|
-
skipSelf: options?.skipSelf
|
|
3118
|
+
skipSelf: options?.skipSelf,
|
|
3119
|
+
vitePluginCustom
|
|
3114
3120
|
});
|
|
3115
3121
|
if (receipt != null) this.data.removeSavedResolveOptions(receipt);
|
|
3116
3122
|
if (res == null) return null;
|
|
@@ -3352,6 +3358,25 @@ function bindingifyModuleParsed(args$1) {
|
|
|
3352
3358
|
};
|
|
3353
3359
|
}
|
|
3354
3360
|
|
|
3361
|
+
//#endregion
|
|
3362
|
+
//#region src/types/chunking-context.ts
|
|
3363
|
+
var ChunkingContext = class {
|
|
3364
|
+
constructor(context) {
|
|
3365
|
+
this.context = context;
|
|
3366
|
+
}
|
|
3367
|
+
getModuleInfo(moduleId) {
|
|
3368
|
+
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
3369
|
+
if (bindingInfo) {
|
|
3370
|
+
const info = transformModuleInfo(bindingInfo, {
|
|
3371
|
+
moduleSideEffects: null,
|
|
3372
|
+
meta: {}
|
|
3373
|
+
});
|
|
3374
|
+
return info;
|
|
3375
|
+
}
|
|
3376
|
+
return null;
|
|
3377
|
+
}
|
|
3378
|
+
};
|
|
3379
|
+
|
|
3355
3380
|
//#endregion
|
|
3356
3381
|
//#region src/utils/transform-rendered-module.ts
|
|
3357
3382
|
function transformToRenderedModule(bindingRenderedModule) {
|
|
@@ -3421,11 +3446,7 @@ function transformChunkModules(modules) {
|
|
|
3421
3446
|
//#region src/utils/bindingify-output-options.ts
|
|
3422
3447
|
function bindingifyOutputOptions(outputOptions) {
|
|
3423
3448
|
const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks } = outputOptions;
|
|
3424
|
-
|
|
3425
|
-
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3426
|
-
else if (manualChunks != null) advancedChunks = { groups: [{ name(id$1) {
|
|
3427
|
-
return manualChunks(id$1, {});
|
|
3428
|
-
} }] };
|
|
3449
|
+
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3429
3450
|
return {
|
|
3430
3451
|
dir,
|
|
3431
3452
|
file: file == null ? void 0 : file,
|
|
@@ -3505,6 +3526,24 @@ function bindingifyAssetFilenames(assetFileNames) {
|
|
|
3505
3526
|
};
|
|
3506
3527
|
return assetFileNames;
|
|
3507
3528
|
}
|
|
3529
|
+
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
3530
|
+
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3531
|
+
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
3532
|
+
return manualChunks(moduleId, { getModuleInfo: (id$1) => ctx.getModuleInfo(id$1) });
|
|
3533
|
+
} }] };
|
|
3534
|
+
if (advancedChunks == null) return void 0;
|
|
3535
|
+
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
3536
|
+
return {
|
|
3537
|
+
...restAdvancedChunks,
|
|
3538
|
+
groups: groups?.map((group) => {
|
|
3539
|
+
const { name,...restGroup } = group;
|
|
3540
|
+
return {
|
|
3541
|
+
...restGroup,
|
|
3542
|
+
name: typeof name === "function" ? (id$1, ctx) => name(id$1, new ChunkingContext(ctx)) : name
|
|
3543
|
+
};
|
|
3544
|
+
})
|
|
3545
|
+
};
|
|
3546
|
+
}
|
|
3508
3547
|
|
|
3509
3548
|
//#endregion
|
|
3510
3549
|
//#region src/options/normalized-output-options.ts
|
|
@@ -4410,7 +4449,8 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
4410
4449
|
moduleSideEffects: true,
|
|
4411
4450
|
annotations: config.annotations,
|
|
4412
4451
|
manualPureFunctions: config.manualPureFunctions,
|
|
4413
|
-
unknownGlobalSideEffects: config.unknownGlobalSideEffects
|
|
4452
|
+
unknownGlobalSideEffects: config.unknownGlobalSideEffects,
|
|
4453
|
+
commonjs: config.commonjs
|
|
4414
4454
|
};
|
|
4415
4455
|
if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
|
|
4416
4456
|
else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
|
package/package.json
CHANGED