rolldown 1.0.0-rc.9 → 1.0.0
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 +207 -73
- package/dist/config.d.mts +1 -2
- package/dist/config.mjs +2 -8
- package/dist/experimental-index.d.mts +7 -7
- package/dist/experimental-index.mjs +12 -13
- package/dist/experimental-runtime-types.d.ts +14 -5
- package/dist/filter-index.d.mts +1 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +5 -9
- package/dist/parallel-plugin-worker.mjs +2 -5
- package/dist/parallel-plugin.d.mts +1 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -3
- package/dist/shared/{binding-C5G6_6ql.mjs → binding-ESkOU1xr.mjs} +27 -27
- package/dist/shared/{binding-BohGL_65.d.mts → binding-zH1vcmbM.d.mts} +66 -21
- package/dist/shared/{bindingify-input-options-Cu7pt6SZ.mjs → bindingify-input-options-zrVFGksD.mjs} +127 -59
- package/dist/shared/{constructors-DNuo4d0H.d.mts → constructors-D0W3rNfA.d.mts} +7 -3
- package/dist/shared/{constructors-Ctal_Rbv.mjs → constructors-D6i2Tbyl.mjs} +8 -2
- package/dist/shared/{define-config-cG45vHwf.d.mts → define-config-5HJ1b9vG.d.mts} +70 -15
- package/dist/shared/{error-CP8smW_P.mjs → error-BrnLyQ-g.mjs} +1 -1
- package/dist/shared/{load-config-B3CpyLPv.mjs → load-config-xUNmcCRn.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-C5RWbu3O.mjs → normalize-string-or-regex-dAjLOSbp.mjs} +22 -12
- package/dist/shared/{parse-B3SIKejW.mjs → parse-_9Vwp6y3.mjs} +3 -3
- package/dist/shared/{prompt-BYQIwEjg.mjs → prompt-U5ajztzG.mjs} +4 -2
- package/dist/shared/{transform-BfdLLNnY.mjs → resolve-tsconfig-DCdBlPeK.mjs} +28 -5
- package/dist/shared/{rolldown-build-4YnQkA76.mjs → rolldown-build-D_ShytiL.mjs} +92 -146
- package/dist/shared/{rolldown-Lc4TvZmS.mjs → rolldown-hwU2j9UL.mjs} +1 -1
- package/dist/shared/{transform-BoJxrM-e.d.mts → transform-DgZ3paSD.d.mts} +19 -2
- package/dist/shared/{watch-B91pWiEX.mjs → watch-Bak_bDNe.mjs} +4 -4
- package/dist/utils-index.d.mts +3 -3
- package/dist/utils-index.mjs +5 -8
- package/package.json +29 -28
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as _oxc_project_types0 from "@oxc-project/types";
|
|
1
|
+
import * as _$_oxc_project_types0 from "@oxc-project/types";
|
|
2
2
|
|
|
3
3
|
//#region src/binding.d.cts
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -160,6 +160,15 @@ interface TreeShakeOptions {
|
|
|
160
160
|
* @default 'always'
|
|
161
161
|
*/
|
|
162
162
|
propertyReadSideEffects?: boolean | 'always';
|
|
163
|
+
/**
|
|
164
|
+
* Whether property write accesses (assignments to member expressions) have side effects.
|
|
165
|
+
*
|
|
166
|
+
* When false, assignments like `obj.prop = value` are considered side-effect-free
|
|
167
|
+
* (assuming the object and value expressions themselves are side-effect-free).
|
|
168
|
+
*
|
|
169
|
+
* @default true
|
|
170
|
+
*/
|
|
171
|
+
propertyWriteSideEffects?: boolean;
|
|
163
172
|
/**
|
|
164
173
|
* Whether accessing a global variable has side effects.
|
|
165
174
|
*
|
|
@@ -199,7 +208,7 @@ interface OxcError {
|
|
|
199
208
|
}
|
|
200
209
|
type Severity = 'Error' | 'Warning' | 'Advice';
|
|
201
210
|
declare class ParseResult {
|
|
202
|
-
get program(): _oxc_project_types0.Program;
|
|
211
|
+
get program(): _$_oxc_project_types0.Program;
|
|
203
212
|
get module(): EcmaScriptModule;
|
|
204
213
|
get comments(): Array<Comment>;
|
|
205
214
|
get errors(): Array<OxcError>;
|
|
@@ -1158,6 +1167,24 @@ interface TypeScriptOptions {
|
|
|
1158
1167
|
* Defaults to `false`.
|
|
1159
1168
|
*/
|
|
1160
1169
|
removeClassFieldsWithoutInitializer?: boolean;
|
|
1170
|
+
/**
|
|
1171
|
+
* When true, optimize const enums by inlining their values at usage sites
|
|
1172
|
+
* and removing the enum declaration.
|
|
1173
|
+
*
|
|
1174
|
+
* @default false
|
|
1175
|
+
*/
|
|
1176
|
+
optimizeConstEnums?: boolean;
|
|
1177
|
+
/**
|
|
1178
|
+
* When true, optimize regular (non-const) enums by inlining their member
|
|
1179
|
+
* accesses at usage sites when the member value is statically known.
|
|
1180
|
+
*
|
|
1181
|
+
* Non-exported enum declarations are also removed when all members are
|
|
1182
|
+
* evaluable and no references to the enum as a runtime value exist
|
|
1183
|
+
* (e.g., `console.log(Foo)`, `typeof Foo`, or passing the enum as an argument).
|
|
1184
|
+
*
|
|
1185
|
+
* @default false
|
|
1186
|
+
*/
|
|
1187
|
+
optimizeEnums?: boolean;
|
|
1161
1188
|
/**
|
|
1162
1189
|
* Also generate a `.d.ts` declaration file for TypeScript files.
|
|
1163
1190
|
*
|
|
@@ -1197,28 +1224,38 @@ declare class BindingDecodedMap {
|
|
|
1197
1224
|
* Each line is an array of segments, where each segment is [generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex?].
|
|
1198
1225
|
*/
|
|
1199
1226
|
get mappings(): Array<Array<Array<number>>>;
|
|
1227
|
+
/** The list of source indices that should be excluded from debugging. */
|
|
1228
|
+
get x_google_ignoreList(): Array<number> | null;
|
|
1200
1229
|
}
|
|
1201
1230
|
declare class BindingMagicString {
|
|
1202
1231
|
constructor(source: string, options?: BindingMagicStringOptions | undefined | null);
|
|
1203
1232
|
get original(): string;
|
|
1204
1233
|
get filename(): string | null;
|
|
1234
|
+
get indentExclusionRanges(): Array<Array<number>> | Array<number> | null;
|
|
1235
|
+
get ignoreList(): boolean;
|
|
1205
1236
|
get offset(): number;
|
|
1206
1237
|
set offset(offset: number);
|
|
1207
1238
|
replace(from: string, to: string): this;
|
|
1208
1239
|
replaceAll(from: string, to: string): this;
|
|
1240
|
+
/**
|
|
1241
|
+
* Returns the UTF-16 offset past the last match, or -1 if no match was found.
|
|
1242
|
+
* The JS wrapper uses this to update `lastIndex` on the caller's RegExp.
|
|
1243
|
+
* Global/sticky behavior is derived from the regex's own flags.
|
|
1244
|
+
*/
|
|
1245
|
+
replaceRegex(from: RegExp, to: string): number;
|
|
1209
1246
|
prepend(content: string): this;
|
|
1210
1247
|
append(content: string): this;
|
|
1211
1248
|
prependLeft(index: number, content: string): this;
|
|
1212
1249
|
prependRight(index: number, content: string): this;
|
|
1213
1250
|
appendLeft(index: number, content: string): this;
|
|
1214
1251
|
appendRight(index: number, content: string): this;
|
|
1215
|
-
overwrite(start: number, end: number, content: string): this;
|
|
1252
|
+
overwrite(start: number, end: number, content: string, options?: BindingOverwriteOptions | undefined | null): this;
|
|
1216
1253
|
toString(): string;
|
|
1217
1254
|
hasChanged(): boolean;
|
|
1218
1255
|
length(): number;
|
|
1219
1256
|
isEmpty(): boolean;
|
|
1220
1257
|
remove(start: number, end: number): this;
|
|
1221
|
-
update(start: number, end: number, content: string): this;
|
|
1258
|
+
update(start: number, end: number, content: string, options?: BindingUpdateOptions | undefined | null): this;
|
|
1222
1259
|
relocate(start: number, end: number, to: number): this;
|
|
1223
1260
|
/**
|
|
1224
1261
|
* Alias for `relocate` to match the original magic-string API.
|
|
@@ -1226,7 +1263,7 @@ declare class BindingMagicString {
|
|
|
1226
1263
|
* Returns `this` for method chaining.
|
|
1227
1264
|
*/
|
|
1228
1265
|
move(start: number, end: number, index: number): this;
|
|
1229
|
-
indent(indentor?: string | undefined | null): this;
|
|
1266
|
+
indent(indentor?: string | undefined | null, options?: BindingIndentOptions | undefined | null): this;
|
|
1230
1267
|
/** Trims whitespace or specified characters from the start and end. */
|
|
1231
1268
|
trim(charType?: string | undefined | null): this;
|
|
1232
1269
|
/** Trims whitespace or specified characters from the start. */
|
|
@@ -1246,6 +1283,8 @@ declare class BindingMagicString {
|
|
|
1246
1283
|
lastChar(): string;
|
|
1247
1284
|
/** Returns the content after the last newline in the generated string. */
|
|
1248
1285
|
lastLine(): string;
|
|
1286
|
+
/** Returns the guessed indentation string, or `\t` if none is found. */
|
|
1287
|
+
getIndentString(): string;
|
|
1249
1288
|
/** Returns a clone with content outside the specified range removed. */
|
|
1250
1289
|
snip(start: number, end: number): BindingMagicString;
|
|
1251
1290
|
/**
|
|
@@ -1255,8 +1294,12 @@ declare class BindingMagicString {
|
|
|
1255
1294
|
*/
|
|
1256
1295
|
reset(start: number, end: number): this;
|
|
1257
1296
|
/**
|
|
1258
|
-
* Returns the content between the specified
|
|
1297
|
+
* Returns the content between the specified UTF-16 code unit positions (JS string indices).
|
|
1259
1298
|
* Supports negative indices (counting from the end).
|
|
1299
|
+
*
|
|
1300
|
+
* When an index falls in the middle of a surrogate pair, the lone surrogate is
|
|
1301
|
+
* included in the result (matching the original magic-string / JS behavior).
|
|
1302
|
+
* This is done by returning a UTF-16 encoded JS string via `napi_create_string_utf16`.
|
|
1260
1303
|
*/
|
|
1261
1304
|
slice(start?: number | undefined | null, end?: number | undefined | null): string;
|
|
1262
1305
|
/**
|
|
@@ -1299,6 +1342,7 @@ declare class BindingNormalizedOptions {
|
|
|
1299
1342
|
get globals(): Record<string, string> | undefined;
|
|
1300
1343
|
get hashCharacters(): 'base64' | 'base36' | 'hex';
|
|
1301
1344
|
get sourcemapDebugIds(): boolean;
|
|
1345
|
+
get sourcemapExcludeSources(): boolean;
|
|
1302
1346
|
get polyfillRequire(): boolean;
|
|
1303
1347
|
get minify(): false | 'dce-only' | MinifyOptions;
|
|
1304
1348
|
get legalComments(): 'none' | 'inline';
|
|
@@ -1340,6 +1384,8 @@ declare class BindingSourceMap {
|
|
|
1340
1384
|
get names(): Array<string>;
|
|
1341
1385
|
/** The VLQ-encoded mappings string. */
|
|
1342
1386
|
get mappings(): string;
|
|
1387
|
+
/** The list of source indices that should be excluded from debugging. */
|
|
1388
|
+
get x_google_ignoreList(): Array<number> | null;
|
|
1343
1389
|
/** Returns the source map as a JSON string. */
|
|
1344
1390
|
toString(): string;
|
|
1345
1391
|
/** Returns the source map as a base64-encoded data URL. */
|
|
@@ -1352,19 +1398,9 @@ declare class BindingSourceMap {
|
|
|
1352
1398
|
declare class BindingWatcherBundler {
|
|
1353
1399
|
close(): Promise<void>;
|
|
1354
1400
|
}
|
|
1355
|
-
/**
|
|
1356
|
-
* Cache for tsconfig resolution to avoid redundant file system operations.
|
|
1357
|
-
*
|
|
1358
|
-
* The cache stores resolved tsconfig configurations keyed by their file paths.
|
|
1359
|
-
* When transforming multiple files in the same project, tsconfig lookups are
|
|
1360
|
-
* deduplicated, improving performance.
|
|
1361
|
-
*
|
|
1362
|
-
* @category Utilities
|
|
1363
|
-
* @experimental
|
|
1364
|
-
*/
|
|
1365
1401
|
declare class TsconfigCache {
|
|
1366
1402
|
/** Create a new transform cache with auto tsconfig discovery enabled. */
|
|
1367
|
-
constructor();
|
|
1403
|
+
constructor(yarnPnp: boolean);
|
|
1368
1404
|
/**
|
|
1369
1405
|
* Clear the cache.
|
|
1370
1406
|
*
|
|
@@ -1374,7 +1410,7 @@ declare class TsconfigCache {
|
|
|
1374
1410
|
/** Get the number of cached entries. */
|
|
1375
1411
|
size(): number;
|
|
1376
1412
|
}
|
|
1377
|
-
type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-wasm-fallback' | 'builtin:vite-web-worker-post';
|
|
1413
|
+
type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-wasm-fallback' | 'builtin:vite-web-worker-post' | 'builtin:oxc-runtime';
|
|
1378
1414
|
interface BindingBundleAnalyzerPluginConfig {
|
|
1379
1415
|
/** Output filename for the bundle analysis data (default: "analyze-data.json") */
|
|
1380
1416
|
fileName?: string;
|
|
@@ -1579,6 +1615,9 @@ interface BindingHookResolveIdExtraArgs {
|
|
|
1579
1615
|
*/
|
|
1580
1616
|
kind: 'import-statement' | 'dynamic-import' | 'require-call' | 'import-rule' | 'url-token' | 'new-url' | 'hot-accept';
|
|
1581
1617
|
}
|
|
1618
|
+
interface BindingIndentOptions {
|
|
1619
|
+
exclude?: Array<Array<number>> | Array<number>;
|
|
1620
|
+
}
|
|
1582
1621
|
interface BindingIsolatedDeclarationPluginConfig {
|
|
1583
1622
|
stripInternal?: boolean;
|
|
1584
1623
|
}
|
|
@@ -1592,6 +1631,8 @@ interface BindingLogLocation {
|
|
|
1592
1631
|
interface BindingMagicStringOptions {
|
|
1593
1632
|
filename?: string;
|
|
1594
1633
|
offset?: number;
|
|
1634
|
+
indentExclusionRanges?: Array<Array<number>> | Array<number>;
|
|
1635
|
+
ignoreList?: boolean;
|
|
1595
1636
|
}
|
|
1596
1637
|
interface BindingModulePreloadOptions {
|
|
1597
1638
|
polyfill: boolean;
|
|
@@ -1604,6 +1645,9 @@ interface BindingModules {
|
|
|
1604
1645
|
values: Array<BindingRenderedModule>;
|
|
1605
1646
|
keys: Array<string>;
|
|
1606
1647
|
}
|
|
1648
|
+
interface BindingOverwriteOptions {
|
|
1649
|
+
contentOnly?: boolean;
|
|
1650
|
+
}
|
|
1607
1651
|
interface BindingPluginContextResolveOptions {
|
|
1608
1652
|
/**
|
|
1609
1653
|
* - `import-statement`: `import { foo } from './lib.js';`
|
|
@@ -1707,6 +1751,9 @@ interface BindingTsconfigResult {
|
|
|
1707
1751
|
tsconfig: BindingTsconfig;
|
|
1708
1752
|
tsconfigFilePaths: Array<string>;
|
|
1709
1753
|
}
|
|
1754
|
+
interface BindingUpdateOptions {
|
|
1755
|
+
overwrite?: boolean;
|
|
1756
|
+
}
|
|
1710
1757
|
interface BindingViteBuildImportAnalysisPluginConfig {
|
|
1711
1758
|
preloadCode: string;
|
|
1712
1759
|
insertPreload: boolean;
|
|
@@ -1845,10 +1892,8 @@ interface PreRenderedChunk {
|
|
|
1845
1892
|
/** Exported variable names from this chunk. */
|
|
1846
1893
|
exports: Array<string>;
|
|
1847
1894
|
}
|
|
1848
|
-
/** @hidden This is only expected to be used by Vite */
|
|
1849
|
-
declare function resolveTsconfig(filename: string, cache?: TsconfigCache | undefined | null): BindingTsconfigResult | null;
|
|
1850
1895
|
interface ViteImportGlobMeta {
|
|
1851
1896
|
isSubImportsPattern?: boolean;
|
|
1852
1897
|
}
|
|
1853
1898
|
//#endregion
|
|
1854
|
-
export {
|
|
1899
|
+
export { ExternalMemoryStatus as A, ResolveResult as B, BindingViteManifestPluginConfig as C, BindingViteResolvePluginConfig as D, BindingViteReporterPluginConfig as E, MinifyResult as F, isolatedDeclaration as G, SourceMap as H, NapiResolveOptions as I, isolatedDeclarationSync as K, ParseResult as L, IsolatedDeclarationsResult as M, JsxOptions as N, BindingViteTransformPluginConfig as O, MinifyOptions as P, ParserOptions as R, BindingViteJsonPluginConfig as S, BindingViteReactRefreshWrapperPluginConfig as T, TransformOptions as U, ResolverFactory as V, TsconfigCache as W, BindingTsconfigRawOptions as _, BindingEnhancedTransformOptions as a, BindingViteDynamicImportVarsPluginConfig as b, BindingHookResolveIdExtraArgs as c, BindingPluginContextResolveOptions as d, BindingRebuildStrategy as f, BindingTsconfigCompilerOptions as g, BindingTransformHookExtraArgs as h, BindingClientHmrUpdate as i, IsolatedDeclarationsOptions as j, BindingWatcherBundler as k, BindingIsolatedDeclarationPluginConfig as l, BindingReplacePluginConfig as m, BindingBundleAnalyzerPluginConfig as n, BindingEnhancedTransformResult as o, BindingRenderedChunk as p, moduleRunnerTransform as q, BindingBundleState as r, BindingEsmExternalRequirePluginConfig as s, BindingBuiltinPluginName as t, BindingMagicString as u, BindingTsconfigResult as v, BindingViteModulePreloadPolyfillPluginConfig as w, BindingViteImportGlobPluginConfig as x, BindingViteBuildImportAnalysisPluginConfig as y, PreRenderedChunk as z };
|
package/dist/shared/{bindingify-input-options-Cu7pt6SZ.mjs → bindingify-input-options-zrVFGksD.mjs}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-ESkOU1xr.mjs";
|
|
2
2
|
import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-D80CXhvg.mjs";
|
|
3
|
-
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
3
|
+
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-dAjLOSbp.mjs";
|
|
4
4
|
import { a as unreachable, o as unsupported, r as noop, t as arraify } from "./misc-DJYbNKZX.mjs";
|
|
5
|
-
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
5
|
+
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-BrnLyQ-g.mjs";
|
|
6
6
|
import { parseAst } from "../parse-ast-index.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import * as filter from "@rolldown/pluginutils";
|
|
9
9
|
import fsp from "node:fs/promises";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0
|
|
11
|
+
var version = "1.0.0";
|
|
12
12
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/constants/version.ts
|
|
@@ -73,6 +73,8 @@ function normalizeHook(hook) {
|
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/plugin/minimal-plugin-context.ts
|
|
75
75
|
var MinimalPluginContextImpl = class {
|
|
76
|
+
pluginName;
|
|
77
|
+
hookName;
|
|
76
78
|
info;
|
|
77
79
|
warn;
|
|
78
80
|
debug;
|
|
@@ -217,7 +219,7 @@ function bindingAssetSource(source) {
|
|
|
217
219
|
return { inner: source };
|
|
218
220
|
}
|
|
219
221
|
//#endregion
|
|
220
|
-
//#region \0@oxc-project+runtime@0.
|
|
222
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
|
|
221
223
|
function __decorate(decorators, target, key, desc) {
|
|
222
224
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
223
225
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -227,6 +229,7 @@ function __decorate(decorators, target, key, desc) {
|
|
|
227
229
|
//#endregion
|
|
228
230
|
//#region src/types/output-asset-impl.ts
|
|
229
231
|
var OutputAssetImpl = class extends PlainObjectLike {
|
|
232
|
+
bindingAsset;
|
|
230
233
|
type = "asset";
|
|
231
234
|
constructor(bindingAsset) {
|
|
232
235
|
super();
|
|
@@ -330,6 +333,7 @@ function transformChunkModules(modules) {
|
|
|
330
333
|
//#endregion
|
|
331
334
|
//#region src/types/output-chunk-impl.ts
|
|
332
335
|
var OutputChunkImpl = class extends PlainObjectLike {
|
|
336
|
+
bindingChunk;
|
|
333
337
|
type = "chunk";
|
|
334
338
|
constructor(bindingChunk) {
|
|
335
339
|
super();
|
|
@@ -567,7 +571,73 @@ Object.defineProperty(import_binding.BindingMagicString.prototype, "isRolldownMa
|
|
|
567
571
|
writable: false,
|
|
568
572
|
configurable: false
|
|
569
573
|
});
|
|
570
|
-
|
|
574
|
+
function assertString(content, msg) {
|
|
575
|
+
if (typeof content !== "string") throw new TypeError(msg);
|
|
576
|
+
}
|
|
577
|
+
const nativeAppend = import_binding.BindingMagicString.prototype.append;
|
|
578
|
+
const nativePrepend = import_binding.BindingMagicString.prototype.prepend;
|
|
579
|
+
const nativeAppendLeft = import_binding.BindingMagicString.prototype.appendLeft;
|
|
580
|
+
const nativeAppendRight = import_binding.BindingMagicString.prototype.appendRight;
|
|
581
|
+
const nativePrependLeft = import_binding.BindingMagicString.prototype.prependLeft;
|
|
582
|
+
const nativePrependRight = import_binding.BindingMagicString.prototype.prependRight;
|
|
583
|
+
const nativeOverwrite = import_binding.BindingMagicString.prototype.overwrite;
|
|
584
|
+
const nativeUpdate = import_binding.BindingMagicString.prototype.update;
|
|
585
|
+
import_binding.BindingMagicString.prototype.append = function(content) {
|
|
586
|
+
assertString(content, "outro content must be a string");
|
|
587
|
+
return nativeAppend.call(this, content);
|
|
588
|
+
};
|
|
589
|
+
import_binding.BindingMagicString.prototype.prepend = function(content) {
|
|
590
|
+
assertString(content, "outro content must be a string");
|
|
591
|
+
return nativePrepend.call(this, content);
|
|
592
|
+
};
|
|
593
|
+
import_binding.BindingMagicString.prototype.appendLeft = function(index, content) {
|
|
594
|
+
assertString(content, "inserted content must be a string");
|
|
595
|
+
return nativeAppendLeft.call(this, index, content);
|
|
596
|
+
};
|
|
597
|
+
import_binding.BindingMagicString.prototype.appendRight = function(index, content) {
|
|
598
|
+
assertString(content, "inserted content must be a string");
|
|
599
|
+
return nativeAppendRight.call(this, index, content);
|
|
600
|
+
};
|
|
601
|
+
import_binding.BindingMagicString.prototype.prependLeft = function(index, content) {
|
|
602
|
+
assertString(content, "inserted content must be a string");
|
|
603
|
+
return nativePrependLeft.call(this, index, content);
|
|
604
|
+
};
|
|
605
|
+
import_binding.BindingMagicString.prototype.prependRight = function(index, content) {
|
|
606
|
+
assertString(content, "inserted content must be a string");
|
|
607
|
+
return nativePrependRight.call(this, index, content);
|
|
608
|
+
};
|
|
609
|
+
import_binding.BindingMagicString.prototype.overwrite = function(start, end, content, options) {
|
|
610
|
+
assertString(content, "replacement content must be a string");
|
|
611
|
+
return nativeOverwrite.call(this, start, end, content, options);
|
|
612
|
+
};
|
|
613
|
+
import_binding.BindingMagicString.prototype.update = function(start, end, content, options) {
|
|
614
|
+
assertString(content, "replacement content must be a string");
|
|
615
|
+
return nativeUpdate.call(this, start, end, content, options);
|
|
616
|
+
};
|
|
617
|
+
const nativeReplace = import_binding.BindingMagicString.prototype.replace;
|
|
618
|
+
const nativeReplaceAll = import_binding.BindingMagicString.prototype.replaceAll;
|
|
619
|
+
import_binding.BindingMagicString.prototype.replace = function(searchValue, replacement) {
|
|
620
|
+
if (typeof searchValue === "string") return nativeReplace.call(this, searchValue, replacement);
|
|
621
|
+
if (searchValue.global) searchValue.lastIndex = 0;
|
|
622
|
+
const lastMatchEnd = this.replaceRegex(searchValue, replacement);
|
|
623
|
+
if (searchValue.global) searchValue.lastIndex = 0;
|
|
624
|
+
else if (searchValue.sticky) searchValue.lastIndex = lastMatchEnd === -1 ? 0 : lastMatchEnd;
|
|
625
|
+
return this;
|
|
626
|
+
};
|
|
627
|
+
import_binding.BindingMagicString.prototype.replaceAll = function(searchValue, replacement) {
|
|
628
|
+
if (typeof searchValue === "string") return nativeReplaceAll.call(this, searchValue, replacement);
|
|
629
|
+
if (!searchValue.global) throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
|
|
630
|
+
searchValue.lastIndex = 0;
|
|
631
|
+
this.replaceRegex(searchValue, replacement);
|
|
632
|
+
searchValue.lastIndex = 0;
|
|
633
|
+
return this;
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* A native MagicString implementation powered by Rust.
|
|
637
|
+
*
|
|
638
|
+
* @experimental
|
|
639
|
+
*/
|
|
640
|
+
const RolldownMagicString = import_binding.BindingMagicString;
|
|
571
641
|
//#endregion
|
|
572
642
|
//#region src/utils/transform-module-info.ts
|
|
573
643
|
function transformModuleInfo(info, option) {
|
|
@@ -604,7 +674,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
|
|
|
604
674
|
return map;
|
|
605
675
|
}
|
|
606
676
|
//#endregion
|
|
607
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
677
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
|
|
608
678
|
function e(e, t, n) {
|
|
609
679
|
let r = (n) => e(n, ...t);
|
|
610
680
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -613,7 +683,7 @@ function e(e, t, n) {
|
|
|
613
683
|
});
|
|
614
684
|
}
|
|
615
685
|
//#endregion
|
|
616
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
686
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/purry.js
|
|
617
687
|
function t$1(t, n, r) {
|
|
618
688
|
let i = t.length - n.length;
|
|
619
689
|
if (i === 0) return t(...n);
|
|
@@ -621,7 +691,7 @@ function t$1(t, n, r) {
|
|
|
621
691
|
throw Error(`Wrong number of arguments`);
|
|
622
692
|
}
|
|
623
693
|
//#endregion
|
|
624
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
694
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/partition.js
|
|
625
695
|
function t(...t) {
|
|
626
696
|
return t$1(n, t);
|
|
627
697
|
}
|
|
@@ -825,6 +895,11 @@ const fsModule = {
|
|
|
825
895
|
//#endregion
|
|
826
896
|
//#region src/plugin/plugin-context.ts
|
|
827
897
|
var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
898
|
+
outputOptions;
|
|
899
|
+
context;
|
|
900
|
+
data;
|
|
901
|
+
onLog;
|
|
902
|
+
currentLoadingModule;
|
|
828
903
|
fs = fsModule;
|
|
829
904
|
getModuleInfo;
|
|
830
905
|
constructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {
|
|
@@ -932,6 +1007,7 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
932
1007
|
//#endregion
|
|
933
1008
|
//#region src/plugin/load-plugin-context.ts
|
|
934
1009
|
var LoadPluginContextImpl = class extends PluginContextImpl {
|
|
1010
|
+
inner;
|
|
935
1011
|
constructor(outputOptions, context, plugin, data, inner, moduleId, onLog, logLevelOption, watchMode) {
|
|
936
1012
|
super(outputOptions, context, plugin, data, onLog, logLevelOption, watchMode, moduleId);
|
|
937
1013
|
this.inner = inner;
|
|
@@ -943,6 +1019,9 @@ var LoadPluginContextImpl = class extends PluginContextImpl {
|
|
|
943
1019
|
//#endregion
|
|
944
1020
|
//#region src/plugin/transform-plugin-context.ts
|
|
945
1021
|
var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
1022
|
+
inner;
|
|
1023
|
+
moduleId;
|
|
1024
|
+
moduleSource;
|
|
946
1025
|
constructor(outputOptions, context, plugin, data, inner, moduleId, moduleSource, onLog, LogLevelOption, watchMode) {
|
|
947
1026
|
super(outputOptions, context, plugin, data, onLog, LogLevelOption, watchMode, moduleId);
|
|
948
1027
|
this.inner = inner;
|
|
@@ -1080,7 +1159,7 @@ function bindingifyTransform(args) {
|
|
|
1080
1159
|
Object.defineProperties(meta, {
|
|
1081
1160
|
magicString: { get() {
|
|
1082
1161
|
if (magicStringInstance) return magicStringInstance;
|
|
1083
|
-
magicStringInstance = new
|
|
1162
|
+
magicStringInstance = new RolldownMagicString(code);
|
|
1084
1163
|
return magicStringInstance;
|
|
1085
1164
|
} },
|
|
1086
1165
|
ast: { get() {
|
|
@@ -1114,7 +1193,7 @@ function bindingifyTransform(args) {
|
|
|
1114
1193
|
let normalizedCode = void 0;
|
|
1115
1194
|
let map = ret.map;
|
|
1116
1195
|
if (typeof ret.code === "string") normalizedCode = ret.code;
|
|
1117
|
-
else if (ret.code instanceof
|
|
1196
|
+
else if (ret.code instanceof RolldownMagicString) {
|
|
1118
1197
|
let magicString = ret.code;
|
|
1119
1198
|
normalizedCode = magicString.toString();
|
|
1120
1199
|
let fallbackSourcemap = ctx.sendMagicString(magicString);
|
|
@@ -1203,14 +1282,14 @@ function bindingifyRenderChunk(args) {
|
|
|
1203
1282
|
if (args.options.experimental?.nativeMagicString) Object.defineProperty(renderChunkMeta, "magicString", {
|
|
1204
1283
|
get() {
|
|
1205
1284
|
if (magicStringInstance) return magicStringInstance;
|
|
1206
|
-
magicStringInstance = new
|
|
1285
|
+
magicStringInstance = new RolldownMagicString(code);
|
|
1207
1286
|
return magicStringInstance;
|
|
1208
1287
|
},
|
|
1209
1288
|
configurable: true
|
|
1210
1289
|
});
|
|
1211
1290
|
const ret = await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), code, transformRenderedChunk(chunk), args.pluginContextData.getOutputOptions(opts), renderChunkMeta);
|
|
1212
1291
|
if (ret == null) return;
|
|
1213
|
-
if (ret instanceof
|
|
1292
|
+
if (ret instanceof RolldownMagicString) {
|
|
1214
1293
|
const normalizedCode = ret.toString();
|
|
1215
1294
|
const generatedMap = ret.generateMap();
|
|
1216
1295
|
return {
|
|
@@ -1225,7 +1304,7 @@ function bindingifyRenderChunk(args) {
|
|
|
1225
1304
|
};
|
|
1226
1305
|
}
|
|
1227
1306
|
if (typeof ret === "string") return { code: ret };
|
|
1228
|
-
if (ret.code instanceof
|
|
1307
|
+
if (ret.code instanceof RolldownMagicString) {
|
|
1229
1308
|
const magicString = ret.code;
|
|
1230
1309
|
const normalizedCode = magicString.toString();
|
|
1231
1310
|
if (ret.map === null) return { code: normalizedCode };
|
|
@@ -1400,30 +1479,6 @@ function bindingifyCloseWatcher(args) {
|
|
|
1400
1479
|
}
|
|
1401
1480
|
//#endregion
|
|
1402
1481
|
//#region src/plugin/generated/hook-usage.ts
|
|
1403
|
-
let HookUsageKind = /* @__PURE__ */ function(HookUsageKind) {
|
|
1404
|
-
HookUsageKind[HookUsageKind["buildStart"] = 1] = "buildStart";
|
|
1405
|
-
HookUsageKind[HookUsageKind["resolveId"] = 2] = "resolveId";
|
|
1406
|
-
HookUsageKind[HookUsageKind["resolveDynamicImport"] = 4] = "resolveDynamicImport";
|
|
1407
|
-
HookUsageKind[HookUsageKind["load"] = 8] = "load";
|
|
1408
|
-
HookUsageKind[HookUsageKind["transform"] = 16] = "transform";
|
|
1409
|
-
HookUsageKind[HookUsageKind["moduleParsed"] = 32] = "moduleParsed";
|
|
1410
|
-
HookUsageKind[HookUsageKind["buildEnd"] = 64] = "buildEnd";
|
|
1411
|
-
HookUsageKind[HookUsageKind["renderStart"] = 128] = "renderStart";
|
|
1412
|
-
HookUsageKind[HookUsageKind["renderError"] = 256] = "renderError";
|
|
1413
|
-
HookUsageKind[HookUsageKind["renderChunk"] = 512] = "renderChunk";
|
|
1414
|
-
HookUsageKind[HookUsageKind["augmentChunkHash"] = 1024] = "augmentChunkHash";
|
|
1415
|
-
HookUsageKind[HookUsageKind["generateBundle"] = 2048] = "generateBundle";
|
|
1416
|
-
HookUsageKind[HookUsageKind["writeBundle"] = 4096] = "writeBundle";
|
|
1417
|
-
HookUsageKind[HookUsageKind["closeBundle"] = 8192] = "closeBundle";
|
|
1418
|
-
HookUsageKind[HookUsageKind["watchChange"] = 16384] = "watchChange";
|
|
1419
|
-
HookUsageKind[HookUsageKind["closeWatcher"] = 32768] = "closeWatcher";
|
|
1420
|
-
HookUsageKind[HookUsageKind["transformAst"] = 65536] = "transformAst";
|
|
1421
|
-
HookUsageKind[HookUsageKind["banner"] = 131072] = "banner";
|
|
1422
|
-
HookUsageKind[HookUsageKind["footer"] = 262144] = "footer";
|
|
1423
|
-
HookUsageKind[HookUsageKind["intro"] = 524288] = "intro";
|
|
1424
|
-
HookUsageKind[HookUsageKind["outro"] = 1048576] = "outro";
|
|
1425
|
-
return HookUsageKind;
|
|
1426
|
-
}({});
|
|
1427
1482
|
var HookUsage = class {
|
|
1428
1483
|
bitflag = BigInt(0);
|
|
1429
1484
|
constructor() {}
|
|
@@ -1436,26 +1491,26 @@ var HookUsage = class {
|
|
|
1436
1491
|
};
|
|
1437
1492
|
function extractHookUsage(plugin) {
|
|
1438
1493
|
let hookUsage = new HookUsage();
|
|
1439
|
-
if (plugin.buildStart) hookUsage.union(
|
|
1440
|
-
if (plugin.resolveId) hookUsage.union(
|
|
1441
|
-
if (plugin.resolveDynamicImport) hookUsage.union(
|
|
1442
|
-
if (plugin.load) hookUsage.union(
|
|
1443
|
-
if (plugin.transform) hookUsage.union(
|
|
1444
|
-
if (plugin.moduleParsed) hookUsage.union(
|
|
1445
|
-
if (plugin.buildEnd) hookUsage.union(
|
|
1446
|
-
if (plugin.renderStart) hookUsage.union(
|
|
1447
|
-
if (plugin.renderError) hookUsage.union(
|
|
1448
|
-
if (plugin.renderChunk) hookUsage.union(
|
|
1449
|
-
if (plugin.augmentChunkHash) hookUsage.union(
|
|
1450
|
-
if (plugin.generateBundle) hookUsage.union(
|
|
1451
|
-
if (plugin.writeBundle) hookUsage.union(
|
|
1452
|
-
if (plugin.closeBundle) hookUsage.union(
|
|
1453
|
-
if (plugin.watchChange) hookUsage.union(
|
|
1454
|
-
if (plugin.closeWatcher) hookUsage.union(
|
|
1455
|
-
if (plugin.banner) hookUsage.union(
|
|
1456
|
-
if (plugin.footer) hookUsage.union(
|
|
1457
|
-
if (plugin.intro) hookUsage.union(
|
|
1458
|
-
if (plugin.outro) hookUsage.union(
|
|
1494
|
+
if (plugin.buildStart) hookUsage.union(1);
|
|
1495
|
+
if (plugin.resolveId) hookUsage.union(2);
|
|
1496
|
+
if (plugin.resolveDynamicImport) hookUsage.union(4);
|
|
1497
|
+
if (plugin.load) hookUsage.union(8);
|
|
1498
|
+
if (plugin.transform) hookUsage.union(16);
|
|
1499
|
+
if (plugin.moduleParsed) hookUsage.union(32);
|
|
1500
|
+
if (plugin.buildEnd) hookUsage.union(64);
|
|
1501
|
+
if (plugin.renderStart) hookUsage.union(128);
|
|
1502
|
+
if (plugin.renderError) hookUsage.union(256);
|
|
1503
|
+
if (plugin.renderChunk) hookUsage.union(512);
|
|
1504
|
+
if (plugin.augmentChunkHash) hookUsage.union(1024);
|
|
1505
|
+
if (plugin.generateBundle) hookUsage.union(2048);
|
|
1506
|
+
if (plugin.writeBundle) hookUsage.union(4096);
|
|
1507
|
+
if (plugin.closeBundle) hookUsage.union(8192);
|
|
1508
|
+
if (plugin.watchChange) hookUsage.union(16384);
|
|
1509
|
+
if (plugin.closeWatcher) hookUsage.union(32768);
|
|
1510
|
+
if (plugin.banner) hookUsage.union(131072);
|
|
1511
|
+
if (plugin.footer) hookUsage.union(262144);
|
|
1512
|
+
if (plugin.intro) hookUsage.union(524288);
|
|
1513
|
+
if (plugin.outro) hookUsage.union(1048576);
|
|
1459
1514
|
return hookUsage;
|
|
1460
1515
|
}
|
|
1461
1516
|
//#endregion
|
|
@@ -1581,6 +1636,8 @@ function wrapHandlers(plugin) {
|
|
|
1581
1636
|
//#endregion
|
|
1582
1637
|
//#region src/options/normalized-input-options.ts
|
|
1583
1638
|
var NormalizedInputOptionsImpl = class extends PlainObjectLike {
|
|
1639
|
+
onLog;
|
|
1640
|
+
inputPlugins;
|
|
1584
1641
|
inner;
|
|
1585
1642
|
constructor(inner, onLog, inputPlugins) {
|
|
1586
1643
|
super();
|
|
@@ -1615,6 +1672,9 @@ __decorate([lazyProp], NormalizedInputOptionsImpl.prototype, "context", null);
|
|
|
1615
1672
|
//#endregion
|
|
1616
1673
|
//#region src/options/normalized-output-options.ts
|
|
1617
1674
|
var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
1675
|
+
inner;
|
|
1676
|
+
outputOptions;
|
|
1677
|
+
normalizedOutputPlugins;
|
|
1618
1678
|
constructor(inner, outputOptions, normalizedOutputPlugins) {
|
|
1619
1679
|
super();
|
|
1620
1680
|
this.inner = inner;
|
|
@@ -1705,6 +1765,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
1705
1765
|
get sourcemapDebugIds() {
|
|
1706
1766
|
return this.inner.sourcemapDebugIds;
|
|
1707
1767
|
}
|
|
1768
|
+
get sourcemapExcludeSources() {
|
|
1769
|
+
return this.inner.sourcemapExcludeSources;
|
|
1770
|
+
}
|
|
1708
1771
|
get sourcemapIgnoreList() {
|
|
1709
1772
|
return this.outputOptions.sourcemapIgnoreList;
|
|
1710
1773
|
}
|
|
@@ -1780,6 +1843,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "globals", null);
|
|
|
1780
1843
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "paths", null);
|
|
1781
1844
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "hashCharacters", null);
|
|
1782
1845
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapDebugIds", null);
|
|
1846
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapExcludeSources", null);
|
|
1783
1847
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapIgnoreList", null);
|
|
1784
1848
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapPathTransform", null);
|
|
1785
1849
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "minify", null);
|
|
@@ -1799,6 +1863,10 @@ function normalizeAddon(value) {
|
|
|
1799
1863
|
//#endregion
|
|
1800
1864
|
//#region src/plugin/plugin-context-data.ts
|
|
1801
1865
|
var PluginContextData = class {
|
|
1866
|
+
onLog;
|
|
1867
|
+
outputOptions;
|
|
1868
|
+
normalizedInputPlugins;
|
|
1869
|
+
normalizedOutputPlugins;
|
|
1802
1870
|
moduleOptionMap = /* @__PURE__ */ new Map();
|
|
1803
1871
|
resolveOptionsMap = /* @__PURE__ */ new Map();
|
|
1804
1872
|
loadModulePromiseMap = /* @__PURE__ */ new Map();
|
|
@@ -2162,4 +2230,4 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
2162
2230
|
};
|
|
2163
2231
|
}
|
|
2164
2232
|
//#endregion
|
|
2165
|
-
export { version as C, description as S, LOG_LEVEL_INFO as _,
|
|
2233
|
+
export { version as C, description as S, LOG_LEVEL_INFO as _, RolldownMagicString as a, RUNTIME_MODULE_ID as b, __decorate as c, PlainObjectLike as d, MinimalPluginContextImpl as f, LOG_LEVEL_ERROR as g, LOG_LEVEL_DEBUG as h, transformModuleInfo as i, transformAssetSource as l, normalizeLog as m, PluginContextData as n, transformToRollupOutput as o, normalizeHook as p, bindingifyPlugin as r, transformRenderedChunk as s, bindingifyInputOptions as t, lazyProp as u, LOG_LEVEL_WARN as v, VERSION as x, logLevelPriority as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { N as BuiltinPlugin, Vt as StringOrRegExp } from "./define-config-
|
|
1
|
+
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-zH1vcmbM.mjs";
|
|
2
|
+
import { N as BuiltinPlugin, Vt as StringOrRegExp } from "./define-config-5HJ1b9vG.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -28,6 +28,10 @@ type ViteReactRefreshWrapperPluginConfig = Omit<BindingViteReactRefreshWrapperPl
|
|
|
28
28
|
include?: StringOrRegExp | StringOrRegExp[];
|
|
29
29
|
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* This plugin should not be used for Rolldown.
|
|
33
|
+
*/
|
|
34
|
+
declare function oxcRuntimePlugin(): BuiltinPlugin;
|
|
31
35
|
declare function viteReactRefreshWrapperPlugin(config: ViteReactRefreshWrapperPluginConfig): BuiltinPlugin;
|
|
32
36
|
//#endregion
|
|
33
|
-
export {
|
|
37
|
+
export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWasmFallbackPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-dAjLOSbp.mjs";
|
|
2
2
|
//#region src/builtin-plugin/constructors.ts
|
|
3
3
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
4
4
|
return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
|
|
@@ -51,6 +51,12 @@ function esmExternalRequirePlugin(config) {
|
|
|
51
51
|
plugin.enforce = "pre";
|
|
52
52
|
return plugin;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* This plugin should not be used for Rolldown.
|
|
56
|
+
*/
|
|
57
|
+
function oxcRuntimePlugin() {
|
|
58
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:oxc-runtime"));
|
|
59
|
+
}
|
|
54
60
|
function viteReactRefreshWrapperPlugin(config) {
|
|
55
61
|
if (config) {
|
|
56
62
|
config.include = normalizedStringOrRegex(config.include);
|
|
@@ -59,4 +65,4 @@ function viteReactRefreshWrapperPlugin(config) {
|
|
|
59
65
|
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config));
|
|
60
66
|
}
|
|
61
67
|
//#endregion
|
|
62
|
-
export {
|
|
68
|
+
export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWasmFallbackPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
|