@rolldown/browser 1.0.0-beta.39 → 1.0.0-beta.40
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 +4 -4
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +2 -2
- package/dist/filter-index.d.mts +3 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.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-aYdpw2Yk.d.mts → binding-BVXbXhPv.d.mts} +7 -4
- package/dist/shared/{define-config-BtZ0vxTw.d.mts → define-config-D9LkukIg.d.mts} +36 -82
- package/dist/shared/{load-config-CqwQxoUE.mjs → load-config-CU4Yss-9.mjs} +1 -1
- package/dist/shared/{parse-ast-index-CIyujJMQ.mjs → parse-ast-index-DuyJNdzo.mjs} +1 -1
- package/dist/shared/{src-ChJBGGvK.mjs → src-BfUPNTHw.mjs} +132 -131
- package/dist/{src-Da5FndSU.js → src-ChN10Pih.js} +132 -131
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ansis_default, description, getCliSchemaInfo, getInputCliKeys, getOutputCliKeys, onExit, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { ansis_default, description, getCliSchemaInfo, getInputCliKeys, getOutputCliKeys, onExit, rolldown, validateCliOptions, version, watch } from "./shared/src-BfUPNTHw.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-DuyJNdzo.mjs";
|
|
3
3
|
import { arraify } from "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { logger } from "./shared/logger-CiCY7ucm.mjs";
|
|
5
|
-
import { loadConfig } from "./shared/load-config-
|
|
5
|
+
import { loadConfig } from "./shared/load-config-CU4Yss-9.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { parseArgs } from "node:util";
|
|
8
8
|
import process$1 from "node:process";
|
|
@@ -241,7 +241,7 @@ function getClearScreenFunction(options$1) {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region \0@oxc-project+runtime@0.
|
|
244
|
+
//#region \0@oxc-project+runtime@0.92.0/helpers/usingCtx.js
|
|
245
245
|
function _usingCtx() {
|
|
246
246
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) {
|
|
247
247
|
var n$1 = Error();
|
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-BVXbXhPv.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-D9LkukIg.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-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { defineConfig, version } from "./shared/src-BfUPNTHw.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-DuyJNdzo.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-CU4Yss-9.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./src-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./src-ChN10Pih.js";
|
|
2
2
|
import { BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReactRefreshWrapperPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReactRefreshWrapperPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-BVXbXhPv.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-D9LkukIg.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-options.d.ts
|
|
5
5
|
interface DevWatchOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./shared/src-BfUPNTHw.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-DuyJNdzo.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { logger } from "./shared/logger-CiCY7ucm.mjs";
|
|
5
5
|
import { BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import {
|
|
1
|
+
import "./shared/binding-BVXbXhPv.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-D9LkukIg.mjs";
|
|
3
|
+
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
3
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-BVXbXhPv.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-D9LkukIg.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-BfUPNTHw.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-DuyJNdzo.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-BfUPNTHw.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-DuyJNdzo.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
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-BVXbXhPv.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-D9LkukIg.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
|
@@ -90,6 +90,7 @@ export const BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallable
|
|
|
90
90
|
export const BindingChunkingContext = __napiModule.exports.BindingChunkingContext
|
|
91
91
|
export const BindingDevEngine = __napiModule.exports.BindingDevEngine
|
|
92
92
|
export const BindingHmrOutput = __napiModule.exports.BindingHmrOutput
|
|
93
|
+
export const BindingMagicString = __napiModule.exports.BindingMagicString
|
|
93
94
|
export const BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
94
95
|
export const BindingNormalizedOptions = __napiModule.exports.BindingNormalizedOptions
|
|
95
96
|
export const BindingOutputAsset = __napiModule.exports.BindingOutputAsset
|
|
@@ -135,6 +135,7 @@ module.exports.BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallab
|
|
|
135
135
|
module.exports.BindingChunkingContext = __napiModule.exports.BindingChunkingContext
|
|
136
136
|
module.exports.BindingDevEngine = __napiModule.exports.BindingDevEngine
|
|
137
137
|
module.exports.BindingHmrOutput = __napiModule.exports.BindingHmrOutput
|
|
138
|
+
module.exports.BindingMagicString = __napiModule.exports.BindingMagicString
|
|
138
139
|
module.exports.BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
139
140
|
module.exports.BindingNormalizedOptions = __napiModule.exports.BindingNormalizedOptions
|
|
140
141
|
module.exports.BindingOutputAsset = __napiModule.exports.BindingOutputAsset
|
|
Binary file
|
|
@@ -18,14 +18,16 @@ interface CompressOptions {
|
|
|
18
18
|
*
|
|
19
19
|
* Set `esnext` to enable all target highering.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* Example:
|
|
22
22
|
*
|
|
23
|
-
* *
|
|
24
|
-
* *
|
|
23
|
+
* * `'es2015'`
|
|
24
|
+
* * `['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']`
|
|
25
25
|
*
|
|
26
26
|
* @default 'esnext'
|
|
27
|
+
*
|
|
28
|
+
* @see [esbuild#target](https://esbuild.github.io/api/#target)
|
|
27
29
|
*/
|
|
28
|
-
target?:
|
|
30
|
+
target?: string | Array<string>;
|
|
29
31
|
/**
|
|
30
32
|
* Pass true to discard calls to `console.*`.
|
|
31
33
|
*
|
|
@@ -1321,6 +1323,7 @@ interface BindingModules {
|
|
|
1321
1323
|
keys: Array<string>;
|
|
1322
1324
|
}
|
|
1323
1325
|
interface BindingReactRefreshWrapperPluginConfig {
|
|
1326
|
+
cwd: string;
|
|
1324
1327
|
include?: Array<BindingStringOrRegex>;
|
|
1325
1328
|
exclude?: Array<BindingStringOrRegex>;
|
|
1326
1329
|
jsxImportSource: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-BVXbXhPv.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
|
+
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
3
4
|
|
|
4
5
|
//#region src/log/logging.d.ts
|
|
5
6
|
type LogLevel = "info" | "debug" | "warn";
|
|
@@ -171,7 +172,38 @@ interface OutputOptions {
|
|
|
171
172
|
sourcemap?: boolean | "inline" | "hidden";
|
|
172
173
|
sourcemapBaseUrl?: string;
|
|
173
174
|
sourcemapDebugIds?: boolean;
|
|
174
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Control which source files are included in the sourcemap ignore list.
|
|
177
|
+
* Files in the ignore list are excluded from debugger stepping and error stack traces.
|
|
178
|
+
*
|
|
179
|
+
* - `false`: Include all source files in the ignore list
|
|
180
|
+
* - `true`: Include no source files in the ignore list
|
|
181
|
+
* - `string`: Files containing this string in their path will be included in the ignore list
|
|
182
|
+
* - `RegExp`: Files matching this regular expression will be included in the ignore list
|
|
183
|
+
* - `function`: Custom function `(source: string, sourcemapPath: string) => boolean` to determine if a source should be ignored
|
|
184
|
+
*
|
|
185
|
+
* :::tip Performance
|
|
186
|
+
* Using static values (`boolean`, `string`, or `RegExp`) is significantly more performant than functions.
|
|
187
|
+
* Calling JavaScript functions from Rust has extremely high overhead, so prefer static patterns when possible.
|
|
188
|
+
* :::
|
|
189
|
+
*
|
|
190
|
+
* ## Examples
|
|
191
|
+
* ```js
|
|
192
|
+
* // ✅ Preferred: Use RegExp for better performance
|
|
193
|
+
* sourcemapIgnoreList: /node_modules/
|
|
194
|
+
*
|
|
195
|
+
* // ✅ Preferred: Use string pattern for better performance
|
|
196
|
+
* sourcemapIgnoreList: "vendor"
|
|
197
|
+
*
|
|
198
|
+
* // ⚠️ Use sparingly: Function calls have high overhead
|
|
199
|
+
* sourcemapIgnoreList: (source, sourcemapPath) => {
|
|
200
|
+
* return source.includes('node_modules') || source.includes('.min.');
|
|
201
|
+
* }
|
|
202
|
+
* ```
|
|
203
|
+
*
|
|
204
|
+
* **default**: /node_modules/
|
|
205
|
+
*/
|
|
206
|
+
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | StringOrRegExp;
|
|
175
207
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
176
208
|
banner?: string | AddonFunction;
|
|
177
209
|
footer?: string | AddonFunction;
|
|
@@ -583,7 +615,7 @@ interface NormalizedOutputOptions {
|
|
|
583
615
|
globals: Record<string, string> | GlobalsFunction;
|
|
584
616
|
hashCharacters: "base64" | "base36" | "hex";
|
|
585
617
|
sourcemapDebugIds: boolean;
|
|
586
|
-
sourcemapIgnoreList: SourcemapIgnoreListOption;
|
|
618
|
+
sourcemapIgnoreList: boolean | SourcemapIgnoreListOption | StringOrRegExp | undefined;
|
|
587
619
|
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
|
588
620
|
minify: false | MinifyOptions | "dce-only";
|
|
589
621
|
legalComments: "none" | "inline";
|
|
@@ -657,84 +689,6 @@ interface RolldownFileStats {
|
|
|
657
689
|
birthtime: Date;
|
|
658
690
|
}
|
|
659
691
|
//#endregion
|
|
660
|
-
//#region ../pluginutils/dist/index.d.mts
|
|
661
|
-
//#region src/composable-filters.d.ts
|
|
662
|
-
type StringOrRegExp$1 = string | RegExp;
|
|
663
|
-
type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
|
|
664
|
-
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Query;
|
|
665
|
-
type TopLevelFilterExpression = Include | Exclude$1;
|
|
666
|
-
declare class And {
|
|
667
|
-
kind: "and";
|
|
668
|
-
args: FilterExpression[];
|
|
669
|
-
constructor(...args: FilterExpression[]);
|
|
670
|
-
}
|
|
671
|
-
declare class Or {
|
|
672
|
-
kind: "or";
|
|
673
|
-
args: FilterExpression[];
|
|
674
|
-
constructor(...args: FilterExpression[]);
|
|
675
|
-
}
|
|
676
|
-
declare class Not {
|
|
677
|
-
kind: "not";
|
|
678
|
-
expr: FilterExpression;
|
|
679
|
-
constructor(expr: FilterExpression);
|
|
680
|
-
}
|
|
681
|
-
interface QueryFilterObject {
|
|
682
|
-
[key: string]: StringOrRegExp$1 | boolean;
|
|
683
|
-
}
|
|
684
|
-
interface IdParams {
|
|
685
|
-
cleanUrl?: boolean;
|
|
686
|
-
}
|
|
687
|
-
declare class Id {
|
|
688
|
-
kind: "id";
|
|
689
|
-
pattern: StringOrRegExp$1;
|
|
690
|
-
params: IdParams;
|
|
691
|
-
constructor(pattern: StringOrRegExp$1, params?: IdParams);
|
|
692
|
-
}
|
|
693
|
-
declare class ModuleType$1 {
|
|
694
|
-
kind: "moduleType";
|
|
695
|
-
pattern: PluginModuleType;
|
|
696
|
-
constructor(pattern: PluginModuleType);
|
|
697
|
-
}
|
|
698
|
-
declare class Code {
|
|
699
|
-
kind: "code";
|
|
700
|
-
pattern: StringOrRegExp$1;
|
|
701
|
-
constructor(expr: StringOrRegExp$1);
|
|
702
|
-
}
|
|
703
|
-
declare class Query {
|
|
704
|
-
kind: "query";
|
|
705
|
-
key: string;
|
|
706
|
-
pattern: StringOrRegExp$1 | boolean;
|
|
707
|
-
constructor(key: string, pattern: StringOrRegExp$1 | boolean);
|
|
708
|
-
}
|
|
709
|
-
declare class Include {
|
|
710
|
-
kind: "include";
|
|
711
|
-
expr: FilterExpression;
|
|
712
|
-
constructor(expr: FilterExpression);
|
|
713
|
-
}
|
|
714
|
-
declare class Exclude$1 {
|
|
715
|
-
kind: "exclude";
|
|
716
|
-
expr: FilterExpression;
|
|
717
|
-
constructor(expr: FilterExpression);
|
|
718
|
-
}
|
|
719
|
-
declare function and(...args: FilterExpression[]): And;
|
|
720
|
-
declare function or(...args: FilterExpression[]): Or;
|
|
721
|
-
declare function not(expr: FilterExpression): Not;
|
|
722
|
-
declare function id(pattern: StringOrRegExp$1, params?: IdParams): Id;
|
|
723
|
-
declare function moduleType(pattern: PluginModuleType): ModuleType$1;
|
|
724
|
-
declare function code(pattern: StringOrRegExp$1): Code;
|
|
725
|
-
declare function query(key: string, pattern: StringOrRegExp$1 | boolean): Query;
|
|
726
|
-
declare function include(expr: FilterExpression): Include;
|
|
727
|
-
declare function exclude(expr: FilterExpression): Exclude$1;
|
|
728
|
-
/**
|
|
729
|
-
* convert a queryObject to FilterExpression like
|
|
730
|
-
* ```js
|
|
731
|
-
* and(query(k1, v1), query(k2, v2))
|
|
732
|
-
* ```
|
|
733
|
-
* @param queryFilterObject The query filter object needs to be matched.
|
|
734
|
-
* @returns a `And` FilterExpression
|
|
735
|
-
*/
|
|
736
|
-
declare function queries(queryFilter: QueryFilterObject): And;
|
|
737
|
-
//#endregion
|
|
738
692
|
//#region src/plugin/hook-filter.d.ts
|
|
739
693
|
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
740
694
|
include?: MaybeArray<Value>;
|
|
@@ -1497,4 +1451,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
1497
1451
|
declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
|
|
1498
1452
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1499
1453
|
//#endregion
|
|
1500
|
-
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, 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, MaybePromise, 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 PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions,
|
|
1454
|
+
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, 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, MaybePromise, 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 PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, defineParallelPlugin, rolldown, watch, withFilter };
|
|
@@ -186,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
189
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.92.0/node_modules/oxc-parser/src-js/wrap.js
|
|
190
190
|
function wrap$1(result) {
|
|
191
191
|
let program, module, comments, errors;
|
|
192
192
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-
|
|
1
|
+
import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-DuyJNdzo.mjs";
|
|
2
2
|
import { and, arraify, code, exclude, id, include, moduleType, noop, or, unimplemented, unreachable, unsupported } from "./dist-CHTC3-kR.mjs";
|
|
3
3
|
import { Worker, isMainThread } from "node:worker_threads";
|
|
4
4
|
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingWatcher, ParallelJsPluginRegistry, initTraceSubscriber, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
@@ -243,7 +243,7 @@ if (isMainThread) {
|
|
|
243
243
|
|
|
244
244
|
//#endregion
|
|
245
245
|
//#region package.json
|
|
246
|
-
var version = "1.0.0-beta.
|
|
246
|
+
var version = "1.0.0-beta.40";
|
|
247
247
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
248
248
|
|
|
249
249
|
//#endregion
|
|
@@ -2114,7 +2114,11 @@ const OutputOptionsSchema = strictObject({
|
|
|
2114
2114
|
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${ansis_default.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
2115
2115
|
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2116
2116
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2117
|
-
sourcemapIgnoreList: optional(union([
|
|
2117
|
+
sourcemapIgnoreList: optional(union([
|
|
2118
|
+
boolean(),
|
|
2119
|
+
custom(() => true),
|
|
2120
|
+
StringOrRegExpSchema
|
|
2121
|
+
])),
|
|
2118
2122
|
sourcemapPathTransform: optional(custom(() => true)),
|
|
2119
2123
|
banner: optional(union([string(), AddonFunctionSchema])),
|
|
2120
2124
|
footer: optional(union([string(), AddonFunctionSchema])),
|
|
@@ -2342,7 +2346,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
|
|
|
2342
2346
|
}
|
|
2343
2347
|
|
|
2344
2348
|
//#endregion
|
|
2345
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2349
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
|
|
2346
2350
|
function e(e$2, t$3, n$2) {
|
|
2347
2351
|
let r$1 = (n$3) => e$2(n$3, ...t$3);
|
|
2348
2352
|
return n$2 === void 0 ? r$1 : Object.assign(r$1, {
|
|
@@ -2352,7 +2356,7 @@ function e(e$2, t$3, n$2) {
|
|
|
2352
2356
|
}
|
|
2353
2357
|
|
|
2354
2358
|
//#endregion
|
|
2355
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2359
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
2356
2360
|
function t(t$3, n$2, r$1) {
|
|
2357
2361
|
let i$1 = t$3.length - n$2.length;
|
|
2358
2362
|
if (i$1 === 0) return t$3(...n$2);
|
|
@@ -2361,7 +2365,7 @@ function t(t$3, n$2, r$1) {
|
|
|
2361
2365
|
}
|
|
2362
2366
|
|
|
2363
2367
|
//#endregion
|
|
2364
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2368
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/partition-DAu403JQ.js
|
|
2365
2369
|
function t$1(...t$3) {
|
|
2366
2370
|
return t(n, t$3);
|
|
2367
2371
|
}
|
|
@@ -3444,130 +3448,6 @@ var NormalizedInputOptionsImpl = class {
|
|
|
3444
3448
|
}
|
|
3445
3449
|
};
|
|
3446
3450
|
|
|
3447
|
-
//#endregion
|
|
3448
|
-
//#region src/types/chunking-context.ts
|
|
3449
|
-
var ChunkingContextImpl = class {
|
|
3450
|
-
constructor(context) {
|
|
3451
|
-
this.context = context;
|
|
3452
|
-
}
|
|
3453
|
-
getModuleInfo(moduleId) {
|
|
3454
|
-
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
3455
|
-
if (bindingInfo) return transformModuleInfo(bindingInfo, {
|
|
3456
|
-
moduleSideEffects: null,
|
|
3457
|
-
meta: {}
|
|
3458
|
-
});
|
|
3459
|
-
return null;
|
|
3460
|
-
}
|
|
3461
|
-
};
|
|
3462
|
-
|
|
3463
|
-
//#endregion
|
|
3464
|
-
//#region src/utils/bindingify-output-options.ts
|
|
3465
|
-
function bindingifyOutputOptions(outputOptions) {
|
|
3466
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
|
|
3467
|
-
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3468
|
-
return {
|
|
3469
|
-
dir,
|
|
3470
|
-
file: file == null ? void 0 : file,
|
|
3471
|
-
format: bindingifyFormat(format),
|
|
3472
|
-
exports,
|
|
3473
|
-
hashCharacters,
|
|
3474
|
-
sourcemap: bindingifySourcemap(sourcemap),
|
|
3475
|
-
sourcemapBaseUrl,
|
|
3476
|
-
sourcemapDebugIds,
|
|
3477
|
-
sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
|
|
3478
|
-
sourcemapPathTransform,
|
|
3479
|
-
banner: bindingifyAddon(banner),
|
|
3480
|
-
footer: bindingifyAddon(footer),
|
|
3481
|
-
intro: bindingifyAddon(intro),
|
|
3482
|
-
outro: bindingifyAddon(outro),
|
|
3483
|
-
extend: outputOptions.extend,
|
|
3484
|
-
globals,
|
|
3485
|
-
esModule,
|
|
3486
|
-
name,
|
|
3487
|
-
assetFileNames: bindingifyAssetFilenames(assetFileNames),
|
|
3488
|
-
entryFileNames,
|
|
3489
|
-
chunkFileNames,
|
|
3490
|
-
cssEntryFileNames,
|
|
3491
|
-
cssChunkFileNames,
|
|
3492
|
-
plugins: [],
|
|
3493
|
-
minify: outputOptions.minify,
|
|
3494
|
-
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
3495
|
-
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
3496
|
-
advancedChunks,
|
|
3497
|
-
polyfillRequire: outputOptions.polyfillRequire,
|
|
3498
|
-
sanitizeFileName,
|
|
3499
|
-
preserveModules,
|
|
3500
|
-
virtualDirname,
|
|
3501
|
-
legalComments,
|
|
3502
|
-
preserveModulesRoot,
|
|
3503
|
-
topLevelVar,
|
|
3504
|
-
minifyInternalExports: outputOptions.minifyInternalExports
|
|
3505
|
-
};
|
|
3506
|
-
}
|
|
3507
|
-
function bindingifyAddon(configAddon) {
|
|
3508
|
-
return async (chunk) => {
|
|
3509
|
-
if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
|
|
3510
|
-
return configAddon || "";
|
|
3511
|
-
};
|
|
3512
|
-
}
|
|
3513
|
-
function bindingifyFormat(format) {
|
|
3514
|
-
switch (format) {
|
|
3515
|
-
case void 0:
|
|
3516
|
-
case "es":
|
|
3517
|
-
case "esm":
|
|
3518
|
-
case "module": return "es";
|
|
3519
|
-
case "cjs":
|
|
3520
|
-
case "commonjs": return "cjs";
|
|
3521
|
-
case "iife": return "iife";
|
|
3522
|
-
case "umd": return "umd";
|
|
3523
|
-
default: unimplemented(`output.format: ${format}`);
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
function bindingifySourcemap(sourcemap) {
|
|
3527
|
-
switch (sourcemap) {
|
|
3528
|
-
case true: return "file";
|
|
3529
|
-
case "inline": return "inline";
|
|
3530
|
-
case false:
|
|
3531
|
-
case void 0: return;
|
|
3532
|
-
case "hidden": return "hidden";
|
|
3533
|
-
default: throw new Error(`unknown sourcemap: ${sourcemap}`);
|
|
3534
|
-
}
|
|
3535
|
-
}
|
|
3536
|
-
function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
|
|
3537
|
-
return typeof sourcemapIgnoreList === "function" ? sourcemapIgnoreList : sourcemapIgnoreList === false ? () => false : (relativeSourcePath, _sourcemapPath) => relativeSourcePath.includes("node_modules");
|
|
3538
|
-
}
|
|
3539
|
-
function bindingifyAssetFilenames(assetFileNames) {
|
|
3540
|
-
if (typeof assetFileNames === "function") return (asset) => {
|
|
3541
|
-
return assetFileNames({
|
|
3542
|
-
name: asset.name,
|
|
3543
|
-
names: asset.names,
|
|
3544
|
-
originalFileName: asset.originalFileName,
|
|
3545
|
-
originalFileNames: asset.originalFileNames,
|
|
3546
|
-
source: transformAssetSource(asset.source),
|
|
3547
|
-
type: "asset"
|
|
3548
|
-
});
|
|
3549
|
-
};
|
|
3550
|
-
return assetFileNames;
|
|
3551
|
-
}
|
|
3552
|
-
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
3553
|
-
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3554
|
-
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
3555
|
-
return manualChunks(moduleId, { getModuleInfo: (id$1) => ctx.getModuleInfo(id$1) });
|
|
3556
|
-
} }] };
|
|
3557
|
-
if (advancedChunks == null) return;
|
|
3558
|
-
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
3559
|
-
return {
|
|
3560
|
-
...restAdvancedChunks,
|
|
3561
|
-
groups: groups?.map((group) => {
|
|
3562
|
-
const { name,...restGroup } = group;
|
|
3563
|
-
return {
|
|
3564
|
-
...restGroup,
|
|
3565
|
-
name: typeof name === "function" ? (id$1, ctx) => name(id$1, new ChunkingContextImpl(ctx)) : name
|
|
3566
|
-
};
|
|
3567
|
-
})
|
|
3568
|
-
};
|
|
3569
|
-
}
|
|
3570
|
-
|
|
3571
3451
|
//#endregion
|
|
3572
3452
|
//#region src/options/normalized-output-options.ts
|
|
3573
3453
|
var NormalizedOutputOptionsImpl = class {
|
|
@@ -3649,7 +3529,7 @@ var NormalizedOutputOptionsImpl = class {
|
|
|
3649
3529
|
return this.inner.sourcemapDebugIds;
|
|
3650
3530
|
}
|
|
3651
3531
|
get sourcemapIgnoreList() {
|
|
3652
|
-
return
|
|
3532
|
+
return this.outputOptions.sourcemapIgnoreList;
|
|
3653
3533
|
}
|
|
3654
3534
|
get sourcemapPathTransform() {
|
|
3655
3535
|
return this.outputOptions.sourcemapPathTransform;
|
|
@@ -4066,6 +3946,127 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
4066
3946
|
};
|
|
4067
3947
|
}
|
|
4068
3948
|
|
|
3949
|
+
//#endregion
|
|
3950
|
+
//#region src/types/chunking-context.ts
|
|
3951
|
+
var ChunkingContextImpl = class {
|
|
3952
|
+
constructor(context) {
|
|
3953
|
+
this.context = context;
|
|
3954
|
+
}
|
|
3955
|
+
getModuleInfo(moduleId) {
|
|
3956
|
+
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
3957
|
+
if (bindingInfo) return transformModuleInfo(bindingInfo, {
|
|
3958
|
+
moduleSideEffects: null,
|
|
3959
|
+
meta: {}
|
|
3960
|
+
});
|
|
3961
|
+
return null;
|
|
3962
|
+
}
|
|
3963
|
+
};
|
|
3964
|
+
|
|
3965
|
+
//#endregion
|
|
3966
|
+
//#region src/utils/bindingify-output-options.ts
|
|
3967
|
+
function bindingifyOutputOptions(outputOptions) {
|
|
3968
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
|
|
3969
|
+
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3970
|
+
return {
|
|
3971
|
+
dir,
|
|
3972
|
+
file: file == null ? void 0 : file,
|
|
3973
|
+
format: bindingifyFormat(format),
|
|
3974
|
+
exports,
|
|
3975
|
+
hashCharacters,
|
|
3976
|
+
sourcemap: bindingifySourcemap(sourcemap),
|
|
3977
|
+
sourcemapBaseUrl,
|
|
3978
|
+
sourcemapDebugIds,
|
|
3979
|
+
sourcemapIgnoreList: sourcemapIgnoreList ?? /node_modules/,
|
|
3980
|
+
sourcemapPathTransform,
|
|
3981
|
+
banner: bindingifyAddon(banner),
|
|
3982
|
+
footer: bindingifyAddon(footer),
|
|
3983
|
+
intro: bindingifyAddon(intro),
|
|
3984
|
+
outro: bindingifyAddon(outro),
|
|
3985
|
+
extend: outputOptions.extend,
|
|
3986
|
+
globals,
|
|
3987
|
+
esModule,
|
|
3988
|
+
name,
|
|
3989
|
+
assetFileNames: bindingifyAssetFilenames(assetFileNames),
|
|
3990
|
+
entryFileNames,
|
|
3991
|
+
chunkFileNames,
|
|
3992
|
+
cssEntryFileNames,
|
|
3993
|
+
cssChunkFileNames,
|
|
3994
|
+
plugins: [],
|
|
3995
|
+
minify: outputOptions.minify,
|
|
3996
|
+
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
3997
|
+
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
3998
|
+
advancedChunks,
|
|
3999
|
+
polyfillRequire: outputOptions.polyfillRequire,
|
|
4000
|
+
sanitizeFileName,
|
|
4001
|
+
preserveModules,
|
|
4002
|
+
virtualDirname,
|
|
4003
|
+
legalComments,
|
|
4004
|
+
preserveModulesRoot,
|
|
4005
|
+
topLevelVar,
|
|
4006
|
+
minifyInternalExports: outputOptions.minifyInternalExports
|
|
4007
|
+
};
|
|
4008
|
+
}
|
|
4009
|
+
function bindingifyAddon(configAddon) {
|
|
4010
|
+
return async (chunk) => {
|
|
4011
|
+
if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
|
|
4012
|
+
return configAddon || "";
|
|
4013
|
+
};
|
|
4014
|
+
}
|
|
4015
|
+
function bindingifyFormat(format) {
|
|
4016
|
+
switch (format) {
|
|
4017
|
+
case void 0:
|
|
4018
|
+
case "es":
|
|
4019
|
+
case "esm":
|
|
4020
|
+
case "module": return "es";
|
|
4021
|
+
case "cjs":
|
|
4022
|
+
case "commonjs": return "cjs";
|
|
4023
|
+
case "iife": return "iife";
|
|
4024
|
+
case "umd": return "umd";
|
|
4025
|
+
default: unimplemented(`output.format: ${format}`);
|
|
4026
|
+
}
|
|
4027
|
+
}
|
|
4028
|
+
function bindingifySourcemap(sourcemap) {
|
|
4029
|
+
switch (sourcemap) {
|
|
4030
|
+
case true: return "file";
|
|
4031
|
+
case "inline": return "inline";
|
|
4032
|
+
case false:
|
|
4033
|
+
case void 0: return;
|
|
4034
|
+
case "hidden": return "hidden";
|
|
4035
|
+
default: throw new Error(`unknown sourcemap: ${sourcemap}`);
|
|
4036
|
+
}
|
|
4037
|
+
}
|
|
4038
|
+
function bindingifyAssetFilenames(assetFileNames) {
|
|
4039
|
+
if (typeof assetFileNames === "function") return (asset) => {
|
|
4040
|
+
return assetFileNames({
|
|
4041
|
+
name: asset.name,
|
|
4042
|
+
names: asset.names,
|
|
4043
|
+
originalFileName: asset.originalFileName,
|
|
4044
|
+
originalFileNames: asset.originalFileNames,
|
|
4045
|
+
source: transformAssetSource(asset.source),
|
|
4046
|
+
type: "asset"
|
|
4047
|
+
});
|
|
4048
|
+
};
|
|
4049
|
+
return assetFileNames;
|
|
4050
|
+
}
|
|
4051
|
+
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
4052
|
+
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
4053
|
+
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
4054
|
+
return manualChunks(moduleId, { getModuleInfo: (id$1) => ctx.getModuleInfo(id$1) });
|
|
4055
|
+
} }] };
|
|
4056
|
+
if (advancedChunks == null) return;
|
|
4057
|
+
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
4058
|
+
return {
|
|
4059
|
+
...restAdvancedChunks,
|
|
4060
|
+
groups: groups?.map((group) => {
|
|
4061
|
+
const { name,...restGroup } = group;
|
|
4062
|
+
return {
|
|
4063
|
+
...restGroup,
|
|
4064
|
+
name: typeof name === "function" ? (id$1, ctx) => name(id$1, new ChunkingContextImpl(ctx)) : name
|
|
4065
|
+
};
|
|
4066
|
+
})
|
|
4067
|
+
};
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4069
4070
|
//#endregion
|
|
4070
4071
|
//#region src/utils/initialize-parallel-plugins.ts
|
|
4071
4072
|
async function initializeParallelPlugins(plugins) {
|
|
@@ -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.40";
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/utils/code-frame.ts
|
|
@@ -2470,7 +2470,11 @@ const OutputOptionsSchema = strictObject({
|
|
|
2470
2470
|
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${ansis_default.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
2471
2471
|
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2472
2472
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2473
|
-
sourcemapIgnoreList: optional(union([
|
|
2473
|
+
sourcemapIgnoreList: optional(union([
|
|
2474
|
+
boolean(),
|
|
2475
|
+
custom(() => true),
|
|
2476
|
+
StringOrRegExpSchema
|
|
2477
|
+
])),
|
|
2474
2478
|
sourcemapPathTransform: optional(custom(() => true)),
|
|
2475
2479
|
banner: optional(union([string(), AddonFunctionSchema])),
|
|
2476
2480
|
footer: optional(union([string(), AddonFunctionSchema])),
|
|
@@ -2767,7 +2771,7 @@ function exclude(expr) {
|
|
|
2767
2771
|
}
|
|
2768
2772
|
|
|
2769
2773
|
//#endregion
|
|
2770
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2774
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
|
|
2771
2775
|
function e(e$2, t$3, n$2) {
|
|
2772
2776
|
let r$1 = (n$3) => e$2(n$3, ...t$3);
|
|
2773
2777
|
return n$2 === void 0 ? r$1 : Object.assign(r$1, {
|
|
@@ -2777,7 +2781,7 @@ function e(e$2, t$3, n$2) {
|
|
|
2777
2781
|
}
|
|
2778
2782
|
|
|
2779
2783
|
//#endregion
|
|
2780
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2784
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
2781
2785
|
function t(t$3, n$2, r$1) {
|
|
2782
2786
|
let i$1 = t$3.length - n$2.length;
|
|
2783
2787
|
if (i$1 === 0) return t$3(...n$2);
|
|
@@ -2786,7 +2790,7 @@ function t(t$3, n$2, r$1) {
|
|
|
2786
2790
|
}
|
|
2787
2791
|
|
|
2788
2792
|
//#endregion
|
|
2789
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2793
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/partition-DAu403JQ.js
|
|
2790
2794
|
function t$1(...t$3) {
|
|
2791
2795
|
return t(n, t$3);
|
|
2792
2796
|
}
|
|
@@ -2946,7 +2950,7 @@ function bindingPluginOrder(order) {
|
|
|
2946
2950
|
}
|
|
2947
2951
|
|
|
2948
2952
|
//#endregion
|
|
2949
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2953
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.92.0/node_modules/oxc-parser/src-js/wrap.js
|
|
2950
2954
|
function wrap$1(result) {
|
|
2951
2955
|
let program, module$1, comments, errors;
|
|
2952
2956
|
return {
|
|
@@ -3945,130 +3949,6 @@ var NormalizedInputOptionsImpl = class {
|
|
|
3945
3949
|
}
|
|
3946
3950
|
};
|
|
3947
3951
|
|
|
3948
|
-
//#endregion
|
|
3949
|
-
//#region src/types/chunking-context.ts
|
|
3950
|
-
var ChunkingContextImpl = class {
|
|
3951
|
-
constructor(context) {
|
|
3952
|
-
this.context = context;
|
|
3953
|
-
}
|
|
3954
|
-
getModuleInfo(moduleId) {
|
|
3955
|
-
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
3956
|
-
if (bindingInfo) return transformModuleInfo(bindingInfo, {
|
|
3957
|
-
moduleSideEffects: null,
|
|
3958
|
-
meta: {}
|
|
3959
|
-
});
|
|
3960
|
-
return null;
|
|
3961
|
-
}
|
|
3962
|
-
};
|
|
3963
|
-
|
|
3964
|
-
//#endregion
|
|
3965
|
-
//#region src/utils/bindingify-output-options.ts
|
|
3966
|
-
function bindingifyOutputOptions(outputOptions) {
|
|
3967
|
-
const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
|
|
3968
|
-
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3969
|
-
return {
|
|
3970
|
-
dir,
|
|
3971
|
-
file: file == null ? void 0 : file,
|
|
3972
|
-
format: bindingifyFormat(format$1),
|
|
3973
|
-
exports,
|
|
3974
|
-
hashCharacters,
|
|
3975
|
-
sourcemap: bindingifySourcemap(sourcemap),
|
|
3976
|
-
sourcemapBaseUrl,
|
|
3977
|
-
sourcemapDebugIds,
|
|
3978
|
-
sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
|
|
3979
|
-
sourcemapPathTransform,
|
|
3980
|
-
banner: bindingifyAddon(banner),
|
|
3981
|
-
footer: bindingifyAddon(footer),
|
|
3982
|
-
intro: bindingifyAddon(intro),
|
|
3983
|
-
outro: bindingifyAddon(outro),
|
|
3984
|
-
extend: outputOptions.extend,
|
|
3985
|
-
globals,
|
|
3986
|
-
esModule,
|
|
3987
|
-
name,
|
|
3988
|
-
assetFileNames: bindingifyAssetFilenames(assetFileNames),
|
|
3989
|
-
entryFileNames,
|
|
3990
|
-
chunkFileNames,
|
|
3991
|
-
cssEntryFileNames,
|
|
3992
|
-
cssChunkFileNames,
|
|
3993
|
-
plugins: [],
|
|
3994
|
-
minify: outputOptions.minify,
|
|
3995
|
-
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
3996
|
-
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
3997
|
-
advancedChunks,
|
|
3998
|
-
polyfillRequire: outputOptions.polyfillRequire,
|
|
3999
|
-
sanitizeFileName,
|
|
4000
|
-
preserveModules,
|
|
4001
|
-
virtualDirname,
|
|
4002
|
-
legalComments,
|
|
4003
|
-
preserveModulesRoot,
|
|
4004
|
-
topLevelVar,
|
|
4005
|
-
minifyInternalExports: outputOptions.minifyInternalExports
|
|
4006
|
-
};
|
|
4007
|
-
}
|
|
4008
|
-
function bindingifyAddon(configAddon) {
|
|
4009
|
-
return async (chunk) => {
|
|
4010
|
-
if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
|
|
4011
|
-
return configAddon || "";
|
|
4012
|
-
};
|
|
4013
|
-
}
|
|
4014
|
-
function bindingifyFormat(format$1) {
|
|
4015
|
-
switch (format$1) {
|
|
4016
|
-
case void 0:
|
|
4017
|
-
case "es":
|
|
4018
|
-
case "esm":
|
|
4019
|
-
case "module": return "es";
|
|
4020
|
-
case "cjs":
|
|
4021
|
-
case "commonjs": return "cjs";
|
|
4022
|
-
case "iife": return "iife";
|
|
4023
|
-
case "umd": return "umd";
|
|
4024
|
-
default: unimplemented(`output.format: ${format$1}`);
|
|
4025
|
-
}
|
|
4026
|
-
}
|
|
4027
|
-
function bindingifySourcemap(sourcemap) {
|
|
4028
|
-
switch (sourcemap) {
|
|
4029
|
-
case true: return "file";
|
|
4030
|
-
case "inline": return "inline";
|
|
4031
|
-
case false:
|
|
4032
|
-
case void 0: return;
|
|
4033
|
-
case "hidden": return "hidden";
|
|
4034
|
-
default: throw new Error(`unknown sourcemap: ${sourcemap}`);
|
|
4035
|
-
}
|
|
4036
|
-
}
|
|
4037
|
-
function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
|
|
4038
|
-
return typeof sourcemapIgnoreList === "function" ? sourcemapIgnoreList : sourcemapIgnoreList === false ? () => false : (relativeSourcePath, _sourcemapPath) => relativeSourcePath.includes("node_modules");
|
|
4039
|
-
}
|
|
4040
|
-
function bindingifyAssetFilenames(assetFileNames) {
|
|
4041
|
-
if (typeof assetFileNames === "function") return (asset) => {
|
|
4042
|
-
return assetFileNames({
|
|
4043
|
-
name: asset.name,
|
|
4044
|
-
names: asset.names,
|
|
4045
|
-
originalFileName: asset.originalFileName,
|
|
4046
|
-
originalFileNames: asset.originalFileNames,
|
|
4047
|
-
source: transformAssetSource(asset.source),
|
|
4048
|
-
type: "asset"
|
|
4049
|
-
});
|
|
4050
|
-
};
|
|
4051
|
-
return assetFileNames;
|
|
4052
|
-
}
|
|
4053
|
-
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
4054
|
-
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
4055
|
-
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
4056
|
-
return manualChunks(moduleId, { getModuleInfo: (id$1) => ctx.getModuleInfo(id$1) });
|
|
4057
|
-
} }] };
|
|
4058
|
-
if (advancedChunks == null) return;
|
|
4059
|
-
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
4060
|
-
return {
|
|
4061
|
-
...restAdvancedChunks,
|
|
4062
|
-
groups: groups?.map((group) => {
|
|
4063
|
-
const { name,...restGroup } = group;
|
|
4064
|
-
return {
|
|
4065
|
-
...restGroup,
|
|
4066
|
-
name: typeof name === "function" ? (id$1, ctx) => name(id$1, new ChunkingContextImpl(ctx)) : name
|
|
4067
|
-
};
|
|
4068
|
-
})
|
|
4069
|
-
};
|
|
4070
|
-
}
|
|
4071
|
-
|
|
4072
3952
|
//#endregion
|
|
4073
3953
|
//#region src/options/normalized-output-options.ts
|
|
4074
3954
|
var NormalizedOutputOptionsImpl = class {
|
|
@@ -4150,7 +4030,7 @@ var NormalizedOutputOptionsImpl = class {
|
|
|
4150
4030
|
return this.inner.sourcemapDebugIds;
|
|
4151
4031
|
}
|
|
4152
4032
|
get sourcemapIgnoreList() {
|
|
4153
|
-
return
|
|
4033
|
+
return this.outputOptions.sourcemapIgnoreList;
|
|
4154
4034
|
}
|
|
4155
4035
|
get sourcemapPathTransform() {
|
|
4156
4036
|
return this.outputOptions.sourcemapPathTransform;
|
|
@@ -4567,6 +4447,127 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
4567
4447
|
};
|
|
4568
4448
|
}
|
|
4569
4449
|
|
|
4450
|
+
//#endregion
|
|
4451
|
+
//#region src/types/chunking-context.ts
|
|
4452
|
+
var ChunkingContextImpl = class {
|
|
4453
|
+
constructor(context) {
|
|
4454
|
+
this.context = context;
|
|
4455
|
+
}
|
|
4456
|
+
getModuleInfo(moduleId) {
|
|
4457
|
+
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
4458
|
+
if (bindingInfo) return transformModuleInfo(bindingInfo, {
|
|
4459
|
+
moduleSideEffects: null,
|
|
4460
|
+
meta: {}
|
|
4461
|
+
});
|
|
4462
|
+
return null;
|
|
4463
|
+
}
|
|
4464
|
+
};
|
|
4465
|
+
|
|
4466
|
+
//#endregion
|
|
4467
|
+
//#region src/utils/bindingify-output-options.ts
|
|
4468
|
+
function bindingifyOutputOptions(outputOptions) {
|
|
4469
|
+
const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
|
|
4470
|
+
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
4471
|
+
return {
|
|
4472
|
+
dir,
|
|
4473
|
+
file: file == null ? void 0 : file,
|
|
4474
|
+
format: bindingifyFormat(format$1),
|
|
4475
|
+
exports,
|
|
4476
|
+
hashCharacters,
|
|
4477
|
+
sourcemap: bindingifySourcemap(sourcemap),
|
|
4478
|
+
sourcemapBaseUrl,
|
|
4479
|
+
sourcemapDebugIds,
|
|
4480
|
+
sourcemapIgnoreList: sourcemapIgnoreList ?? /node_modules/,
|
|
4481
|
+
sourcemapPathTransform,
|
|
4482
|
+
banner: bindingifyAddon(banner),
|
|
4483
|
+
footer: bindingifyAddon(footer),
|
|
4484
|
+
intro: bindingifyAddon(intro),
|
|
4485
|
+
outro: bindingifyAddon(outro),
|
|
4486
|
+
extend: outputOptions.extend,
|
|
4487
|
+
globals,
|
|
4488
|
+
esModule,
|
|
4489
|
+
name,
|
|
4490
|
+
assetFileNames: bindingifyAssetFilenames(assetFileNames),
|
|
4491
|
+
entryFileNames,
|
|
4492
|
+
chunkFileNames,
|
|
4493
|
+
cssEntryFileNames,
|
|
4494
|
+
cssChunkFileNames,
|
|
4495
|
+
plugins: [],
|
|
4496
|
+
minify: outputOptions.minify,
|
|
4497
|
+
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
4498
|
+
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
4499
|
+
advancedChunks,
|
|
4500
|
+
polyfillRequire: outputOptions.polyfillRequire,
|
|
4501
|
+
sanitizeFileName,
|
|
4502
|
+
preserveModules,
|
|
4503
|
+
virtualDirname,
|
|
4504
|
+
legalComments,
|
|
4505
|
+
preserveModulesRoot,
|
|
4506
|
+
topLevelVar,
|
|
4507
|
+
minifyInternalExports: outputOptions.minifyInternalExports
|
|
4508
|
+
};
|
|
4509
|
+
}
|
|
4510
|
+
function bindingifyAddon(configAddon) {
|
|
4511
|
+
return async (chunk) => {
|
|
4512
|
+
if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
|
|
4513
|
+
return configAddon || "";
|
|
4514
|
+
};
|
|
4515
|
+
}
|
|
4516
|
+
function bindingifyFormat(format$1) {
|
|
4517
|
+
switch (format$1) {
|
|
4518
|
+
case void 0:
|
|
4519
|
+
case "es":
|
|
4520
|
+
case "esm":
|
|
4521
|
+
case "module": return "es";
|
|
4522
|
+
case "cjs":
|
|
4523
|
+
case "commonjs": return "cjs";
|
|
4524
|
+
case "iife": return "iife";
|
|
4525
|
+
case "umd": return "umd";
|
|
4526
|
+
default: unimplemented(`output.format: ${format$1}`);
|
|
4527
|
+
}
|
|
4528
|
+
}
|
|
4529
|
+
function bindingifySourcemap(sourcemap) {
|
|
4530
|
+
switch (sourcemap) {
|
|
4531
|
+
case true: return "file";
|
|
4532
|
+
case "inline": return "inline";
|
|
4533
|
+
case false:
|
|
4534
|
+
case void 0: return;
|
|
4535
|
+
case "hidden": return "hidden";
|
|
4536
|
+
default: throw new Error(`unknown sourcemap: ${sourcemap}`);
|
|
4537
|
+
}
|
|
4538
|
+
}
|
|
4539
|
+
function bindingifyAssetFilenames(assetFileNames) {
|
|
4540
|
+
if (typeof assetFileNames === "function") return (asset) => {
|
|
4541
|
+
return assetFileNames({
|
|
4542
|
+
name: asset.name,
|
|
4543
|
+
names: asset.names,
|
|
4544
|
+
originalFileName: asset.originalFileName,
|
|
4545
|
+
originalFileNames: asset.originalFileNames,
|
|
4546
|
+
source: transformAssetSource(asset.source),
|
|
4547
|
+
type: "asset"
|
|
4548
|
+
});
|
|
4549
|
+
};
|
|
4550
|
+
return assetFileNames;
|
|
4551
|
+
}
|
|
4552
|
+
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
4553
|
+
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
4554
|
+
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
4555
|
+
return manualChunks(moduleId, { getModuleInfo: (id$1) => ctx.getModuleInfo(id$1) });
|
|
4556
|
+
} }] };
|
|
4557
|
+
if (advancedChunks == null) return;
|
|
4558
|
+
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
4559
|
+
return {
|
|
4560
|
+
...restAdvancedChunks,
|
|
4561
|
+
groups: groups?.map((group) => {
|
|
4562
|
+
const { name,...restGroup } = group;
|
|
4563
|
+
return {
|
|
4564
|
+
...restGroup,
|
|
4565
|
+
name: typeof name === "function" ? (id$1, ctx) => name(id$1, new ChunkingContextImpl(ctx)) : name
|
|
4566
|
+
};
|
|
4567
|
+
})
|
|
4568
|
+
};
|
|
4569
|
+
}
|
|
4570
|
+
|
|
4570
4571
|
//#endregion
|
|
4571
4572
|
//#region src/utils/create-bundler-option.ts
|
|
4572
4573
|
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
package/package.json
CHANGED