@rolldown/browser 1.0.0-beta.52 → 1.0.0-beta.53
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 +8 -10
- package/dist/config.d.mts +1 -3
- package/dist/config.mjs +6 -9
- package/dist/{constructors-DW3R_Jog.js → constructors-YnYYKXAq.js} +2 -8
- package/dist/experimental-index.browser.mjs +21 -9
- package/dist/experimental-index.d.mts +20 -8
- package/dist/experimental-index.mjs +23 -14
- package/dist/filter-index.d.mts +1 -3
- package/dist/index.browser.mjs +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +6 -9
- package/dist/{normalize-string-or-regex-BcbPUrYo.js → normalize-string-or-regex-BVvsez4S.js} +41 -4
- package/dist/parallel-plugin-worker.mjs +3 -6
- package/dist/parallel-plugin.d.mts +2 -3
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -2
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -4
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-CUYnBV3u.js → rolldown-build-DdLgyfGg.js} +332 -184
- package/dist/shared/{binding-BKL2JHoJ.d.mts → binding-CY7Z709f.d.mts} +45 -3
- package/dist/shared/{bindingify-input-options-D4i1DYzt.mjs → bindingify-input-options-DcGFRvkp.mjs} +7 -5
- package/dist/shared/{constructors-XFp0WhK3.mjs → constructors-Bi2whoYR.mjs} +2 -8
- package/dist/shared/{constructors-BvaMwihu.d.mts → constructors-S9gqtBdT.d.mts} +3 -5
- package/dist/shared/{define-config-Buedmg9e.d.mts → define-config-CPSppdHs.d.mts} +2 -2
- package/dist/shared/{load-config-C9CjEv2m.mjs → load-config-B09j7Dnd.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-D1mB67Iy.mjs → normalize-string-or-regex-Bsz_9HAl.mjs} +41 -4
- package/dist/shared/{parse-ast-index-BSDTTjWT.mjs → parse-ast-index-BOAjpcDq.mjs} +1 -1
- package/dist/shared/{rolldown-build-BWJGpMD0.mjs → rolldown-build-CyazSAHY.mjs} +333 -187
- package/dist/shared/{rolldown-0ID0Q4xL.mjs → rolldown-vJGs7rCs.mjs} +1 -1
- package/dist/shared/{utils-DKydZ4iH.d.mts → utils-m9n-gTFq.d.mts} +1 -1
- package/dist/shared/{watch-CwnSQOS4.mjs → watch-Abdexkk9.mjs} +3 -3
- package/package.json +1 -1
|
@@ -1269,6 +1269,44 @@ declare class BindingMagicString {
|
|
|
1269
1269
|
relocate(start: number, end: number, to: number): void;
|
|
1270
1270
|
indent(indentor?: string | undefined | null): void;
|
|
1271
1271
|
}
|
|
1272
|
+
declare class BindingNormalizedOptions {
|
|
1273
|
+
get input(): Array<string> | Record<string, string>;
|
|
1274
|
+
get cwd(): string | null;
|
|
1275
|
+
get platform(): 'node' | 'browser' | 'neutral';
|
|
1276
|
+
get shimMissingExports(): boolean;
|
|
1277
|
+
get name(): string | null;
|
|
1278
|
+
get cssEntryFilenames(): string | undefined;
|
|
1279
|
+
get cssChunkFilenames(): string | undefined;
|
|
1280
|
+
get entryFilenames(): string | undefined;
|
|
1281
|
+
get chunkFilenames(): string | undefined;
|
|
1282
|
+
get assetFilenames(): string | undefined;
|
|
1283
|
+
get dir(): string | null;
|
|
1284
|
+
get file(): string | null;
|
|
1285
|
+
get format(): 'es' | 'cjs' | 'iife' | 'umd';
|
|
1286
|
+
get exports(): 'default' | 'named' | 'none' | 'auto';
|
|
1287
|
+
get esModule(): boolean | 'if-default-prop';
|
|
1288
|
+
get inlineDynamicImports(): boolean;
|
|
1289
|
+
get sourcemap(): boolean | 'inline' | 'hidden';
|
|
1290
|
+
get sourcemapBaseUrl(): string | null;
|
|
1291
|
+
get banner(): string | undefined | null | undefined;
|
|
1292
|
+
get footer(): string | undefined | null | undefined;
|
|
1293
|
+
get intro(): string | undefined | null | undefined;
|
|
1294
|
+
get outro(): string | undefined | null | undefined;
|
|
1295
|
+
get externalLiveBindings(): boolean;
|
|
1296
|
+
get extend(): boolean;
|
|
1297
|
+
get globals(): Record<string, string> | undefined;
|
|
1298
|
+
get hashCharacters(): 'base64' | 'base36' | 'hex';
|
|
1299
|
+
get sourcemapDebugIds(): boolean;
|
|
1300
|
+
get polyfillRequire(): boolean;
|
|
1301
|
+
get minify(): false | 'dce-only' | MinifyOptions;
|
|
1302
|
+
get legalComments(): 'none' | 'inline';
|
|
1303
|
+
get preserveModules(): boolean;
|
|
1304
|
+
get preserveModulesRoot(): string | undefined;
|
|
1305
|
+
get virtualDirname(): string;
|
|
1306
|
+
get topLevelVar(): boolean;
|
|
1307
|
+
get minifyInternalExports(): boolean;
|
|
1308
|
+
get context(): string;
|
|
1309
|
+
}
|
|
1272
1310
|
declare class BindingOutputAsset {
|
|
1273
1311
|
dropInner(): ExternalMemoryStatus;
|
|
1274
1312
|
getFileName(): string;
|
|
@@ -1504,9 +1542,10 @@ interface BindingViteCssPostPluginConfig {
|
|
|
1504
1542
|
urlBase: string;
|
|
1505
1543
|
decodedBase: string;
|
|
1506
1544
|
libCssFilename?: string;
|
|
1507
|
-
isLegacy?: () => boolean;
|
|
1545
|
+
isLegacy?: (args: BindingNormalizedOptions) => boolean;
|
|
1508
1546
|
cssMinify?: (css: string, inline: boolean) => Promise<string>;
|
|
1509
1547
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1548
|
+
cssScopeTo: () => Record<string, readonly [string, string | undefined]>;
|
|
1510
1549
|
}
|
|
1511
1550
|
interface BindingViteDynamicImportVarsPluginConfig {
|
|
1512
1551
|
include?: Array<BindingStringOrRegex>;
|
|
@@ -1528,6 +1567,7 @@ interface BindingViteHtmlPluginConfig {
|
|
|
1528
1567
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1529
1568
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1530
1569
|
transformIndexHtml: (html: string, path: string, filename: string, hook: 'transform' | 'generateBundle', output?: BindingOutputs, chunk?: BindingOutputChunk) => Promise<string>;
|
|
1570
|
+
setModuleSideEffects: (id: string) => void;
|
|
1531
1571
|
}
|
|
1532
1572
|
interface BindingViteImportGlobPluginConfig {
|
|
1533
1573
|
root?: string;
|
|
@@ -1543,7 +1583,7 @@ interface BindingViteManifestPluginConfig {
|
|
|
1543
1583
|
root: string;
|
|
1544
1584
|
outPath: string;
|
|
1545
1585
|
isEnableV2?: boolean;
|
|
1546
|
-
isLegacy?: () => boolean;
|
|
1586
|
+
isLegacy?: (args: BindingNormalizedOptions) => boolean;
|
|
1547
1587
|
cssEntries: () => Record<string, string>;
|
|
1548
1588
|
}
|
|
1549
1589
|
interface BindingViteModulePreloadPolyfillPluginConfig {
|
|
@@ -1574,6 +1614,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1574
1614
|
external: true | string[];
|
|
1575
1615
|
noExternal: true | Array<string | RegExp>;
|
|
1576
1616
|
dedupe: Array<string>;
|
|
1617
|
+
disableCache?: boolean;
|
|
1577
1618
|
legacyInconsistentCjsInterop?: boolean;
|
|
1578
1619
|
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>;
|
|
1579
1620
|
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>;
|
|
@@ -1611,6 +1652,7 @@ interface BindingViteTransformPluginConfig {
|
|
|
1611
1652
|
interface BindingViteWasmHelperPluginConfig {
|
|
1612
1653
|
decodedBase: string;
|
|
1613
1654
|
}
|
|
1655
|
+
declare function createTokioRuntime(blockingThreads?: number | undefined | null): void;
|
|
1614
1656
|
interface ExternalMemoryStatus {
|
|
1615
1657
|
freed: boolean;
|
|
1616
1658
|
reason?: string;
|
|
@@ -1629,4 +1671,4 @@ interface PreRenderedChunk {
|
|
|
1629
1671
|
exports: Array<string>;
|
|
1630
1672
|
}
|
|
1631
1673
|
//#endregion
|
|
1632
|
-
export { BindingWatcherBundler as A, ParserOptions as B, BindingViteManifestPluginConfig as C, BindingViteResolvePluginConfig as D, BindingViteReporterPluginConfig as E, JsxOptions as F, TransformResult as G, ResolveResult as H, MinifyOptions as I,
|
|
1674
|
+
export { transformSync as $, BindingWatcherBundler as A, ParserOptions as B, BindingViteManifestPluginConfig as C, BindingViteResolvePluginConfig as D, BindingViteReporterPluginConfig as E, JsxOptions as F, TransformResult as G, ResolveResult as H, MinifyOptions as I, isolatedDeclarationSync as J, createTokioRuntime as K, MinifyResult as L, ExternalMemoryStatus as M, IsolatedDeclarationsOptions as N, BindingViteTransformPluginConfig as O, IsolatedDeclarationsResult as P, transform as Q, NapiResolveOptions as R, BindingViteJsonPluginConfig as S, BindingViteReactRefreshWrapperPluginConfig as T, ResolverFactory as U, PreRenderedChunk as V, TransformOptions as W, minifySync as X, minify as Y, moduleRunnerTransform as Z, BindingViteCssPostPluginConfig as _, BindingHookResolveIdExtraArgs as a, BindingViteHtmlPluginConfig as b, BindingRebuildStrategy as c, BindingTransformHookExtraArgs as d, BindingUrlResolver as f, BindingViteCssPluginConfig as g, BindingViteBuildImportAnalysisPluginConfig as h, BindingEsmExternalRequirePluginConfig as i, BindingWatcherEvent as j, BindingViteWasmHelperPluginConfig as k, BindingRenderedChunk as l, BindingViteAssetPluginConfig as m, BindingBundleState as n, BindingIsolatedDeclarationPluginConfig as o, BindingViteAssetImportMetaUrlPluginConfig as p, isolatedDeclaration as q, BindingClientHmrUpdate as r, BindingMagicString as s, BindingBuiltinPluginName as t, BindingReplacePluginConfig as u, BindingViteDynamicImportVarsPluginConfig as v, BindingViteModulePreloadPolyfillPluginConfig as w, BindingViteImportGlobPluginConfig as x, BindingViteHtmlInlineProxyPluginConfig as y, ParseResult as z };
|
package/dist/shared/{bindingify-input-options-D4i1DYzt.mjs → bindingify-input-options-DcGFRvkp.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-CPsamAuj.mjs";
|
|
2
2
|
import { a as unreachable, i as unimplemented, o as unsupported, t as arraify } from "./misc-5GYLGQ20.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as parseAst } from "./parse-ast-index-
|
|
3
|
+
import { E as LOG_LEVEL_WARN, S as normalizeLog, _ as PlainObjectLike, a as bindingifyManifestPlugin, c as collectChangedBundle, d as bindingifySourcemap, f as transformRenderedChunk, g as lazyProp, i as bindingifyCSSPostPlugin, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, v as MinimalPluginContextImpl } from "./normalize-string-or-regex-Bsz_9HAl.mjs";
|
|
4
|
+
import { t as parseAst } from "./parse-ast-index-BOAjpcDq.mjs";
|
|
5
5
|
import { a as include, c as or, i as id, n as code, o as moduleType, r as exclude, t as and } from "./composable-filters-DZ5ToxRJ.mjs";
|
|
6
6
|
import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects } from "../rolldown-binding.wasi.cjs";
|
|
7
7
|
import path from "node:path";
|
|
@@ -1342,9 +1342,11 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
1342
1342
|
const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedOutputPlugins);
|
|
1343
1343
|
const plugins = rawPlugins.map((plugin) => {
|
|
1344
1344
|
if ("_parallel" in plugin) return;
|
|
1345
|
-
if (plugin instanceof BuiltinPlugin) {
|
|
1346
|
-
|
|
1347
|
-
return
|
|
1345
|
+
if (plugin instanceof BuiltinPlugin) switch (plugin.name) {
|
|
1346
|
+
case "builtin:vite-css-post": return bindingifyCSSPostPlugin(plugin, pluginContextData);
|
|
1347
|
+
case "builtin:vite-html": return bindingifyViteHtmlPlugin(plugin, onLog, logLevel, watchMode, pluginContextData);
|
|
1348
|
+
case "builtin:vite-manifest": return bindingifyManifestPlugin(plugin, pluginContextData);
|
|
1349
|
+
default: return bindingifyBuiltInPlugin(plugin);
|
|
1348
1350
|
}
|
|
1349
1351
|
return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
|
|
1350
1352
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Bsz_9HAl.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/builtin-plugin/constructors.ts
|
|
4
4
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
@@ -17,9 +17,6 @@ function viteImportGlobPlugin(config) {
|
|
|
17
17
|
function viteReporterPlugin(config) {
|
|
18
18
|
return new BuiltinPlugin("builtin:vite-reporter", config);
|
|
19
19
|
}
|
|
20
|
-
function viteManifestPlugin(config) {
|
|
21
|
-
return new BuiltinPlugin("builtin:vite-manifest", config);
|
|
22
|
-
}
|
|
23
20
|
function viteWasmHelperPlugin(config) {
|
|
24
21
|
return new BuiltinPlugin("builtin:vite-wasm-helper", config);
|
|
25
22
|
}
|
|
@@ -54,9 +51,6 @@ function viteReactRefreshWrapperPlugin(config) {
|
|
|
54
51
|
}
|
|
55
52
|
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config));
|
|
56
53
|
}
|
|
57
|
-
function viteCSSPostPlugin(config) {
|
|
58
|
-
return new BuiltinPlugin("builtin:vite-css-post", config);
|
|
59
|
-
}
|
|
60
54
|
function viteHtmlInlineProxyPlugin(config) {
|
|
61
55
|
return new BuiltinPlugin("builtin:vite-html-inline-proxy", config);
|
|
62
56
|
}
|
|
@@ -65,4 +59,4 @@ function viteAssetImportMetaUrlPlugin(config) {
|
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
//#endregion
|
|
68
|
-
export {
|
|
62
|
+
export { viteDynamicImportVarsPlugin as a, viteJsonPlugin as c, viteReactRefreshWrapperPlugin as d, viteReporterPlugin as f, viteWebWorkerPostPlugin as g, viteWasmHelperPlugin as h, viteBuildImportAnalysisPlugin as i, viteLoadFallbackPlugin as l, viteWasmFallbackPlugin as m, isolatedDeclarationPlugin as n, viteHtmlInlineProxyPlugin as o, viteResolvePlugin as p, viteAssetImportMetaUrlPlugin as r, viteImportGlobPlugin as s, esmExternalRequirePlugin as t, viteModulePreloadPolyfillPlugin as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BuiltinPlugin, u as StringOrRegExp } from "./utils-
|
|
2
|
-
import {
|
|
1
|
+
import { t as BuiltinPlugin, u as StringOrRegExp } from "./utils-m9n-gTFq.mjs";
|
|
2
|
+
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, h as BindingViteBuildImportAnalysisPluginConfig, i as BindingEsmExternalRequirePluginConfig, k as BindingViteWasmHelperPluginConfig, o as BindingIsolatedDeclarationPluginConfig, p as BindingViteAssetImportMetaUrlPluginConfig, v as BindingViteDynamicImportVarsPluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteHtmlInlineProxyPluginConfig } from "./binding-CY7Z709f.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -10,7 +10,6 @@ type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConf
|
|
|
10
10
|
declare function viteDynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
11
11
|
declare function viteImportGlobPlugin(config?: BindingViteImportGlobPluginConfig): BuiltinPlugin;
|
|
12
12
|
declare function viteReporterPlugin(config?: BindingViteReporterPluginConfig): BuiltinPlugin;
|
|
13
|
-
declare function viteManifestPlugin(config?: BindingViteManifestPluginConfig): BuiltinPlugin;
|
|
14
13
|
declare function viteWasmHelperPlugin(config?: BindingViteWasmHelperPluginConfig): BuiltinPlugin;
|
|
15
14
|
declare function viteWasmFallbackPlugin(): BuiltinPlugin;
|
|
16
15
|
declare function viteLoadFallbackPlugin(): BuiltinPlugin;
|
|
@@ -25,8 +24,7 @@ type ViteReactRefreshWrapperPluginConfig = Omit<BindingViteReactRefreshWrapperPl
|
|
|
25
24
|
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
26
25
|
};
|
|
27
26
|
declare function viteReactRefreshWrapperPlugin(config: ViteReactRefreshWrapperPluginConfig): BuiltinPlugin;
|
|
28
|
-
declare function viteCSSPostPlugin(config?: BindingViteCssPostPluginConfig): BuiltinPlugin;
|
|
29
27
|
declare function viteHtmlInlineProxyPlugin(config: BindingViteHtmlInlineProxyPluginConfig): BuiltinPlugin;
|
|
30
28
|
declare function viteAssetImportMetaUrlPlugin(config: BindingViteAssetImportMetaUrlPluginConfig): BuiltinPlugin;
|
|
31
29
|
//#endregion
|
|
32
|
-
export {
|
|
30
|
+
export { viteDynamicImportVarsPlugin as a, viteJsonPlugin as c, viteReactRefreshWrapperPlugin as d, viteReporterPlugin as f, viteWebWorkerPostPlugin as g, viteWasmHelperPlugin as h, viteBuildImportAnalysisPlugin as i, viteLoadFallbackPlugin as l, viteWasmFallbackPlugin as m, isolatedDeclarationPlugin as n, viteHtmlInlineProxyPlugin as o, viteResolvePlugin as p, viteAssetImportMetaUrlPlugin as r, viteImportGlobPlugin as s, esmExternalRequirePlugin as t, viteModulePreloadPolyfillPlugin as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as MakeAsync, c as NullValue, d as LogLevel, f as LogLevelOption, g as RollupLogWithString, h as RollupLog, l as PartialNull, m as RollupError, n as LoggingFunction, o as MaybeArray, p as LogOrStringHandler, r as LoggingFunctionWithPosition, s as MaybePromise, t as BuiltinPlugin, u as StringOrRegExp } from "./utils-
|
|
2
|
-
import { A as BindingWatcherBundler, B as ParserOptions, F as JsxOptions, I as MinifyOptions$1, M as ExternalMemoryStatus, V as PreRenderedChunk, W as TransformOptions$1, a as BindingHookResolveIdExtraArgs, d as BindingTransformHookExtraArgs, j as BindingWatcherEvent, l as BindingRenderedChunk, s as BindingMagicString } from "./binding-
|
|
1
|
+
import { a as MakeAsync, c as NullValue, d as LogLevel, f as LogLevelOption, g as RollupLogWithString, h as RollupLog, l as PartialNull, m as RollupError, n as LoggingFunction, o as MaybeArray, p as LogOrStringHandler, r as LoggingFunctionWithPosition, s as MaybePromise, t as BuiltinPlugin, u as StringOrRegExp } from "./utils-m9n-gTFq.mjs";
|
|
2
|
+
import { A as BindingWatcherBundler, B as ParserOptions, F as JsxOptions, I as MinifyOptions$1, M as ExternalMemoryStatus, V as PreRenderedChunk, W as TransformOptions$1, a as BindingHookResolveIdExtraArgs, d as BindingTransformHookExtraArgs, j as BindingWatcherEvent, l as BindingRenderedChunk, s as BindingMagicString } from "./binding-CY7Z709f.mjs";
|
|
3
3
|
import { Program } from "@oxc-project/types";
|
|
4
4
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
5
5
|
|
|
@@ -32,7 +32,7 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
|
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region package.json
|
|
35
|
-
var version = "1.0.0-beta.
|
|
35
|
+
var version = "1.0.0-beta.53";
|
|
36
36
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
@@ -190,7 +190,7 @@ function bindingAssetSource(source) {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
//#endregion
|
|
193
|
-
//#region \0@oxc-project+runtime@0.
|
|
193
|
+
//#region \0@oxc-project+runtime@0.101.0/helpers/decorate.js
|
|
194
194
|
function __decorate(decorators, target, key, desc) {
|
|
195
195
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
196
196
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -584,7 +584,36 @@ function bindingifyBuiltInPlugin(plugin) {
|
|
|
584
584
|
options: plugin._options
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function bindingifyManifestPlugin(plugin, pluginContextData) {
|
|
588
|
+
const { isOutputOptionsForLegacyChunks, ...options } = plugin._options;
|
|
589
|
+
return {
|
|
590
|
+
__name: plugin.name,
|
|
591
|
+
options: {
|
|
592
|
+
...options,
|
|
593
|
+
isLegacy: isOutputOptionsForLegacyChunks ? (opts) => {
|
|
594
|
+
return isOutputOptionsForLegacyChunks(pluginContextData.getOutputOptions(opts));
|
|
595
|
+
} : void 0
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
function bindingifyCSSPostPlugin(plugin, pluginContextData) {
|
|
600
|
+
const { isOutputOptionsForLegacyChunks, ...options } = plugin._options;
|
|
601
|
+
return {
|
|
602
|
+
__name: plugin.name,
|
|
603
|
+
options: {
|
|
604
|
+
...options,
|
|
605
|
+
isLegacy: isOutputOptionsForLegacyChunks ? (opts) => {
|
|
606
|
+
return isOutputOptionsForLegacyChunks(pluginContextData.getOutputOptions(opts));
|
|
607
|
+
} : void 0,
|
|
608
|
+
cssScopeTo() {
|
|
609
|
+
const cssScopeTo = {};
|
|
610
|
+
for (const [id, opts] of pluginContextData.moduleOptionMap.entries()) if (opts?.meta.vite?.cssScopeTo) cssScopeTo[id] = opts.meta.vite.cssScopeTo;
|
|
611
|
+
return cssScopeTo;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
function bindingifyViteHtmlPlugin(plugin, onLog, logLevel, watchMode, pluginContextData) {
|
|
588
617
|
const { preHooks, normalHooks, postHooks, applyHtmlTransforms, ...options } = plugin._options;
|
|
589
618
|
if (preHooks.length + normalHooks.length + postHooks.length > 0) return {
|
|
590
619
|
__name: plugin.name,
|
|
@@ -605,6 +634,14 @@ function bindingifyViteHtmlPlugin(plugin, onLog, logLevel, watchMode) {
|
|
|
605
634
|
case "transform": return await applyHtmlTransforms(html, preHooks, pluginContext, context);
|
|
606
635
|
case "generateBundle": return await applyHtmlTransforms(html, [...normalHooks, ...postHooks], pluginContext, context);
|
|
607
636
|
}
|
|
637
|
+
},
|
|
638
|
+
setModuleSideEffects(id) {
|
|
639
|
+
let opts = pluginContextData.getModuleOption(id);
|
|
640
|
+
pluginContextData.updateModuleOption(id, {
|
|
641
|
+
moduleSideEffects: true,
|
|
642
|
+
meta: opts.meta,
|
|
643
|
+
invalidate: true
|
|
644
|
+
});
|
|
608
645
|
}
|
|
609
646
|
}
|
|
610
647
|
};
|
|
@@ -626,4 +663,4 @@ function isReadonlyArray(input) {
|
|
|
626
663
|
}
|
|
627
664
|
|
|
628
665
|
//#endregion
|
|
629
|
-
export {
|
|
666
|
+
export { LOG_LEVEL_DEBUG as C, logLevelPriority as D, LOG_LEVEL_WARN as E, normalizeLog as S, LOG_LEVEL_INFO as T, PlainObjectLike as _, bindingifyManifestPlugin as a, description as b, collectChangedBundle as c, bindingifySourcemap as d, transformRenderedChunk as f, lazyProp as g, transformAssetSource as h, bindingifyCSSPostPlugin as i, transformToOutputBundle as l, bindingAssetSource as m, BuiltinPlugin as n, bindingifyViteHtmlPlugin as o, __decorate as p, bindingifyBuiltInPlugin as r, makeBuiltinPluginCallable as s, normalizedStringOrRegex as t, transformToRollupOutput as u, MinimalPluginContextImpl as v, LOG_LEVEL_ERROR as w, version as x, VERSION as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-CPsamAuj.mjs";
|
|
2
2
|
import { parse, parseSync } from "../rolldown-binding.wasi.cjs";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
4
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.101.0/node_modules/oxc-parser/src-js/wrap.js
|
|
5
5
|
function wrap$1(result) {
|
|
6
6
|
let program, module, comments, errors;
|
|
7
7
|
return {
|