@rolldown/browser 1.0.0-beta.49 → 1.0.0-beta.51
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 +12 -8
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +9 -5
- package/dist/constructors-DoUEJY6G.js +65 -0
- package/dist/experimental-index.browser.mjs +17 -11
- package/dist/experimental-index.d.mts +52 -15
- package/dist/experimental-index.mjs +21 -13
- package/dist/filter-index.d.mts +3 -3
- package/dist/filter-index.mjs +2 -1
- package/dist/index.browser.mjs +161 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +36 -4
- package/dist/normalize-string-or-regex-BXFT9GiS.js +830 -0
- package/dist/parallel-plugin-worker.mjs +5 -4
- package/dist/parallel-plugin.d.mts +3 -3
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +3 -2
- package/dist/rolldown-binding.wasi-browser.js +5 -2
- package/dist/rolldown-binding.wasi.cjs +5 -2
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{src-CnMyHYgB.js → rolldown-build-C0UB1WZy.js} +32 -756
- package/dist/shared/{binding-B4uTNiw2.d.mts → binding-lSvYApx7.d.mts} +198 -89
- package/dist/shared/bindingify-input-options-CSdAtTcQ.mjs +1568 -0
- package/dist/shared/{composable-filters-CBpK2Fbc.mjs → composable-filters-DZ5ToxRJ.mjs} +1 -22
- package/dist/shared/constructors-DF6M1PTb.mjs +65 -0
- package/dist/shared/constructors-DgFF472b.d.mts +31 -0
- package/dist/shared/{define-config-BAQ9c-hh.d.mts → define-config-BKu-xa_0.d.mts} +10 -49
- package/dist/shared/define-config-DfeZGBEt.mjs +7 -0
- package/dist/shared/{load-config-DQI-2sfE.mjs → load-config-Beo_LOwd.mjs} +1 -1
- package/dist/shared/misc-5GYLGQ20.mjs +22 -0
- package/dist/shared/normalize-string-or-regex-DvECZN2V.mjs +629 -0
- package/dist/shared/{parse-ast-index-D9jH_38U.mjs → parse-ast-index-C_M-Y4oC.mjs} +3 -3
- package/dist/shared/{prompt-Ckjl2FdJ.mjs → prompt-pmGBC3ws.mjs} +1 -1
- package/dist/shared/rolldown-BhV7L6Kg.mjs +10 -0
- package/dist/shared/rolldown-build-DYR94CyF.mjs +2121 -0
- package/dist/shared/utils-BJWI2OzT.d.mts +62 -0
- package/dist/shared/watch-Cjxo-3u4.mjs +338 -0
- package/package.json +1 -1
- package/dist/constructors-EhfoQfqh.js +0 -68
- package/dist/normalize-string-or-regex-d47jXr3r.js +0 -231
- package/dist/shared/constructors-CaN9lKj2.d.mts +0 -32
- package/dist/shared/constructors-DcEzB0nc.mjs +0 -68
- package/dist/shared/normalize-string-or-regex-CbDij6KB.mjs +0 -46
- package/dist/shared/src-CZ_U2fML.mjs +0 -4597
- package/dist/shared/utils-CduIqa7h.d.mts +0 -18
|
@@ -73,6 +73,8 @@ interface CompressOptions {
|
|
|
73
73
|
dropLabels?: Array<string>;
|
|
74
74
|
/** Limit the maximum number of iterations for debugging purpose. */
|
|
75
75
|
maxIterations?: number;
|
|
76
|
+
/** Treeshake options. */
|
|
77
|
+
treeshake?: TreeShakeOptions;
|
|
76
78
|
}
|
|
77
79
|
interface CompressOptionsKeepNames {
|
|
78
80
|
/**
|
|
@@ -122,10 +124,14 @@ interface MangleOptionsKeepNames {
|
|
|
122
124
|
*/
|
|
123
125
|
class: boolean;
|
|
124
126
|
}
|
|
125
|
-
/**
|
|
126
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Minify asynchronously.
|
|
129
|
+
*
|
|
130
|
+
* Note: This function can be slower than `minifySync` due to the overhead of spawning a thread.
|
|
131
|
+
*/
|
|
132
|
+
declare function minify(filename: string, sourceText: string, options?: MinifyOptions | undefined | null): Promise<MinifyResult>;
|
|
127
133
|
interface MinifyOptions {
|
|
128
|
-
/** Use when minifying an
|
|
134
|
+
/** Use when minifying an ES module. */
|
|
129
135
|
module?: boolean;
|
|
130
136
|
compress?: boolean | CompressOptions;
|
|
131
137
|
mangle?: boolean | MangleOptions;
|
|
@@ -137,6 +143,41 @@ interface MinifyResult {
|
|
|
137
143
|
map?: SourceMap;
|
|
138
144
|
errors: Array<OxcError>;
|
|
139
145
|
}
|
|
146
|
+
/** Minify synchronously. */
|
|
147
|
+
declare function minifySync(filename: string, sourceText: string, options?: MinifyOptions | undefined | null): MinifyResult;
|
|
148
|
+
interface TreeShakeOptions {
|
|
149
|
+
/**
|
|
150
|
+
* Whether to respect the pure annotations.
|
|
151
|
+
*
|
|
152
|
+
* Pure annotations are comments that mark an expression as pure.
|
|
153
|
+
* For example: @__PURE__ or #__NO_SIDE_EFFECTS__.
|
|
154
|
+
*
|
|
155
|
+
* @default true
|
|
156
|
+
*/
|
|
157
|
+
annotations?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Whether to treat this function call as pure.
|
|
160
|
+
*
|
|
161
|
+
* This function is called for normal function calls, new calls, and
|
|
162
|
+
* tagged template calls.
|
|
163
|
+
*/
|
|
164
|
+
manualPureFunctions?: Array<string>;
|
|
165
|
+
/**
|
|
166
|
+
* Whether property read accesses have side effects.
|
|
167
|
+
*
|
|
168
|
+
* @default 'always'
|
|
169
|
+
*/
|
|
170
|
+
propertyReadSideEffects?: boolean | 'always';
|
|
171
|
+
/**
|
|
172
|
+
* Whether accessing a global variable has side effects.
|
|
173
|
+
*
|
|
174
|
+
* Accessing a non-existing global variable will throw an error.
|
|
175
|
+
* Global variable may be a getter that has side effects.
|
|
176
|
+
*
|
|
177
|
+
* @default true
|
|
178
|
+
*/
|
|
179
|
+
unknownGlobalSideEffects?: boolean;
|
|
180
|
+
}
|
|
140
181
|
interface Comment {
|
|
141
182
|
type: 'Line' | 'Block';
|
|
142
183
|
value: string;
|
|
@@ -235,7 +276,7 @@ type ImportNameKind = /** `import { x } from "mod"` */
|
|
|
235
276
|
*
|
|
236
277
|
* Note: This function can be slower than `parseSync` due to the overhead of spawning a thread.
|
|
237
278
|
*/
|
|
238
|
-
declare function
|
|
279
|
+
declare function parse(filename: string, sourceText: string, options?: ParserOptions | undefined | null): Promise<ParseResult>;
|
|
239
280
|
interface ParserOptions {
|
|
240
281
|
/** Treat the source text as `js`, `jsx`, `ts`, `tsx` or `dts`. */
|
|
241
282
|
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts';
|
|
@@ -732,8 +773,12 @@ type HelperMode =
|
|
|
732
773
|
interface Helpers {
|
|
733
774
|
mode?: HelperMode;
|
|
734
775
|
}
|
|
735
|
-
/**
|
|
736
|
-
|
|
776
|
+
/**
|
|
777
|
+
* TypeScript Isolated Declarations for Standalone DTS Emit (async)
|
|
778
|
+
*
|
|
779
|
+
* Note: This function can be slower than `isolatedDeclarationSync` due to the overhead of spawning a thread.
|
|
780
|
+
*/
|
|
781
|
+
declare function isolatedDeclaration(filename: string, sourceText: string, options?: IsolatedDeclarationsOptions | undefined | null): Promise<IsolatedDeclarationsResult>;
|
|
737
782
|
interface IsolatedDeclarationsOptions {
|
|
738
783
|
/**
|
|
739
784
|
* Do not emit declarations for code that has an @internal annotation in its JSDoc comment.
|
|
@@ -751,6 +796,8 @@ interface IsolatedDeclarationsResult {
|
|
|
751
796
|
map?: SourceMap;
|
|
752
797
|
errors: Array<OxcError>;
|
|
753
798
|
}
|
|
799
|
+
/** TypeScript Isolated Declarations for Standalone DTS Emit */
|
|
800
|
+
declare function isolatedDeclarationSync(filename: string, sourceText: string, options?: IsolatedDeclarationsOptions | undefined | null): IsolatedDeclarationsResult;
|
|
754
801
|
/**
|
|
755
802
|
* Configure how TSX and JSX are transformed.
|
|
756
803
|
*
|
|
@@ -787,7 +834,7 @@ interface JsxOptions {
|
|
|
787
834
|
/**
|
|
788
835
|
* Enables `@babel/plugin-transform-react-pure-annotations`.
|
|
789
836
|
*
|
|
790
|
-
* It will mark top-level React method calls as pure for tree shaking.
|
|
837
|
+
* It will mark JSX elements and top-level React method calls as pure for tree shaking.
|
|
791
838
|
*
|
|
792
839
|
* @see {@link https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations}
|
|
793
840
|
*
|
|
@@ -856,9 +903,11 @@ interface JsxOptions {
|
|
|
856
903
|
* @returns an object containing the transformed code, source maps, and any
|
|
857
904
|
* errors that occurred during parsing or transformation.
|
|
858
905
|
*
|
|
906
|
+
* Note: This function can be slower than `moduleRunnerTransformSync` due to the overhead of spawning a thread.
|
|
907
|
+
*
|
|
859
908
|
* @deprecated Only works for Vite.
|
|
860
909
|
*/
|
|
861
|
-
declare function moduleRunnerTransform(filename: string, sourceText: string, options?: ModuleRunnerTransformOptions | undefined | null): ModuleRunnerTransformResult
|
|
910
|
+
declare function moduleRunnerTransform(filename: string, sourceText: string, options?: ModuleRunnerTransformOptions | undefined | null): Promise<ModuleRunnerTransformResult>;
|
|
862
911
|
interface ModuleRunnerTransformOptions {
|
|
863
912
|
/**
|
|
864
913
|
* Enable source map generation.
|
|
@@ -897,6 +946,7 @@ interface ModuleRunnerTransformResult {
|
|
|
897
946
|
}
|
|
898
947
|
interface PluginsOptions {
|
|
899
948
|
styledComponents?: StyledComponentsOptions;
|
|
949
|
+
taggedTemplateEscape?: boolean;
|
|
900
950
|
}
|
|
901
951
|
interface ReactRefreshOptions {
|
|
902
952
|
/**
|
|
@@ -992,18 +1042,20 @@ interface StyledComponentsOptions {
|
|
|
992
1042
|
topLevelImportPaths?: Array<string>;
|
|
993
1043
|
}
|
|
994
1044
|
/**
|
|
995
|
-
* Transpile a JavaScript or TypeScript into a target ECMAScript version.
|
|
1045
|
+
* Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
|
|
1046
|
+
*
|
|
1047
|
+
* Note: This function can be slower than `transform` due to the overhead of spawning a thread.
|
|
996
1048
|
*
|
|
997
1049
|
* @param filename The name of the file being transformed. If this is a
|
|
998
|
-
* relative path, consider setting the {@link TransformOptions#cwd} option
|
|
1050
|
+
* relative path, consider setting the {@link TransformOptions#cwd} option.
|
|
999
1051
|
* @param sourceText the source code itself
|
|
1000
1052
|
* @param options The options for the transformation. See {@link
|
|
1001
1053
|
* TransformOptions} for more information.
|
|
1002
1054
|
*
|
|
1003
|
-
* @returns an object containing the transformed code,
|
|
1004
|
-
* errors that occurred during parsing or transformation.
|
|
1055
|
+
* @returns a promise that resolves to an object containing the transformed code,
|
|
1056
|
+
* source maps, and any errors that occurred during parsing or transformation.
|
|
1005
1057
|
*/
|
|
1006
|
-
declare function transform(filename: string, sourceText: string, options?: TransformOptions | undefined | null): TransformResult
|
|
1058
|
+
declare function transform(filename: string, sourceText: string, options?: TransformOptions | undefined | null): Promise<TransformResult>;
|
|
1007
1059
|
/**
|
|
1008
1060
|
* Options for transforming a JavaScript or TypeScript file.
|
|
1009
1061
|
*
|
|
@@ -1112,6 +1164,19 @@ interface TransformResult {
|
|
|
1112
1164
|
*/
|
|
1113
1165
|
errors: Array<OxcError>;
|
|
1114
1166
|
}
|
|
1167
|
+
/**
|
|
1168
|
+
* Transpile a JavaScript or TypeScript into a target ECMAScript version.
|
|
1169
|
+
*
|
|
1170
|
+
* @param filename The name of the file being transformed. If this is a
|
|
1171
|
+
* relative path, consider setting the {@link TransformOptions#cwd} option..
|
|
1172
|
+
* @param sourceText the source code itself
|
|
1173
|
+
* @param options The options for the transformation. See {@link
|
|
1174
|
+
* TransformOptions} for more information.
|
|
1175
|
+
*
|
|
1176
|
+
* @returns an object containing the transformed code, source maps, and any
|
|
1177
|
+
* errors that occurred during parsing or transformation.
|
|
1178
|
+
*/
|
|
1179
|
+
declare function transformSync(filename: string, sourceText: string, options?: TransformOptions | undefined | null): TransformResult;
|
|
1115
1180
|
interface TypeScriptOptions {
|
|
1116
1181
|
jsxPragma?: string;
|
|
1117
1182
|
jsxPragmaFrag?: string;
|
|
@@ -1212,6 +1277,32 @@ declare class BindingMagicString {
|
|
|
1212
1277
|
relocate(start: number, end: number, to: number): void;
|
|
1213
1278
|
indent(indentor?: string | undefined | null): void;
|
|
1214
1279
|
}
|
|
1280
|
+
declare class BindingOutputAsset {
|
|
1281
|
+
dropInner(): ExternalMemoryStatus;
|
|
1282
|
+
getFileName(): string;
|
|
1283
|
+
getOriginalFileName(): string | null;
|
|
1284
|
+
getOriginalFileNames(): Array<string>;
|
|
1285
|
+
getSource(): BindingAssetSource;
|
|
1286
|
+
getName(): string | null;
|
|
1287
|
+
getNames(): Array<string>;
|
|
1288
|
+
}
|
|
1289
|
+
declare class BindingOutputChunk {
|
|
1290
|
+
dropInner(): ExternalMemoryStatus;
|
|
1291
|
+
getIsEntry(): boolean;
|
|
1292
|
+
getIsDynamicEntry(): boolean;
|
|
1293
|
+
getFacadeModuleId(): string | null;
|
|
1294
|
+
getModuleIds(): Array<string>;
|
|
1295
|
+
getExports(): Array<string>;
|
|
1296
|
+
getFileName(): string;
|
|
1297
|
+
getModules(): BindingModules;
|
|
1298
|
+
getImports(): Array<string>;
|
|
1299
|
+
getDynamicImports(): Array<string>;
|
|
1300
|
+
getCode(): string;
|
|
1301
|
+
getMap(): string | null;
|
|
1302
|
+
getSourcemapFileName(): string | null;
|
|
1303
|
+
getPreliminaryFileName(): string;
|
|
1304
|
+
getName(): string;
|
|
1305
|
+
}
|
|
1215
1306
|
declare class BindingRenderedChunk {
|
|
1216
1307
|
get name(): string;
|
|
1217
1308
|
get isEntry(): boolean;
|
|
@@ -1249,43 +1340,14 @@ declare class BindingWatcherEvent {
|
|
|
1249
1340
|
bundleEventKind(): string;
|
|
1250
1341
|
bundleErrorData(): BindingBundleErrorEventData;
|
|
1251
1342
|
}
|
|
1252
|
-
interface
|
|
1253
|
-
|
|
1254
|
-
isSsr: boolean;
|
|
1255
|
-
isWorker: boolean;
|
|
1256
|
-
urlBase: string;
|
|
1257
|
-
publicDir: string;
|
|
1258
|
-
decodedBase: string;
|
|
1259
|
-
isSkipAssets: boolean;
|
|
1260
|
-
assetsInclude: Array<BindingStringOrRegex>;
|
|
1261
|
-
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1262
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1263
|
-
}
|
|
1264
|
-
interface BindingBuildImportAnalysisPluginConfig {
|
|
1265
|
-
preloadCode: string;
|
|
1266
|
-
insertPreload: boolean;
|
|
1267
|
-
optimizeModulePreloadRelativePaths: boolean;
|
|
1268
|
-
renderBuiltUrl: boolean;
|
|
1269
|
-
isRelativeBase: boolean;
|
|
1270
|
-
v2?: BindingBuildImportAnalysisPluginV2Config;
|
|
1343
|
+
interface BindingAssetSource {
|
|
1344
|
+
inner: string | Uint8Array;
|
|
1271
1345
|
}
|
|
1272
|
-
|
|
1273
|
-
isSsr: boolean;
|
|
1274
|
-
urlBase: string;
|
|
1275
|
-
decodedBase: string;
|
|
1276
|
-
modulePreload: false | BindingModulePreloadOptions;
|
|
1277
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1278
|
-
}
|
|
1279
|
-
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:esm-external-require' | 'builtin:html-inline-proxy' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:react-refresh-wrapper' | 'builtin:reporter' | 'builtin:replace' | 'builtin:transform' | 'builtin:vite-css' | 'builtin:vite-css-post' | 'builtin:vite-html' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
|
|
1346
|
+
type BindingBuiltinPluginName = 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-asset' | 'builtin:vite-asset-import-meta-url' | 'builtin:vite-build-import-analysis' | 'builtin:vite-css' | 'builtin:vite-css-post' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-html' | 'builtin:vite-html-inline-proxy' | '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-wasm-helper' | 'builtin:vite-web-worker-post';
|
|
1280
1347
|
interface BindingClientHmrUpdate {
|
|
1281
1348
|
clientId: string;
|
|
1282
1349
|
update: BindingHmrUpdate;
|
|
1283
1350
|
}
|
|
1284
|
-
interface BindingDynamicImportVarsPluginConfig {
|
|
1285
|
-
include?: Array<BindingStringOrRegex>;
|
|
1286
|
-
exclude?: Array<BindingStringOrRegex>;
|
|
1287
|
-
resolver?: (id: string, importer: string) => MaybePromise<string | undefined>;
|
|
1288
|
-
}
|
|
1289
1351
|
type BindingError = {
|
|
1290
1352
|
type: 'JsError';
|
|
1291
1353
|
field0: Error;
|
|
@@ -1328,19 +1390,9 @@ interface BindingHookResolveIdExtraArgs {
|
|
|
1328
1390
|
*/
|
|
1329
1391
|
kind: 'import-statement' | 'dynamic-import' | 'require-call' | 'import-rule' | 'url-token' | 'new-url' | 'hot-accept';
|
|
1330
1392
|
}
|
|
1331
|
-
interface BindingImportGlobPluginConfig {
|
|
1332
|
-
root?: string;
|
|
1333
|
-
restoreQueryExtension?: boolean;
|
|
1334
|
-
}
|
|
1335
1393
|
interface BindingIsolatedDeclarationPluginConfig {
|
|
1336
1394
|
stripInternal?: boolean;
|
|
1337
1395
|
}
|
|
1338
|
-
interface BindingJsonPluginConfig {
|
|
1339
|
-
minify?: boolean;
|
|
1340
|
-
namedExports?: boolean;
|
|
1341
|
-
stringify?: BindingJsonPluginStringify;
|
|
1342
|
-
}
|
|
1343
|
-
type BindingJsonPluginStringify = boolean | string;
|
|
1344
1396
|
interface BindingJsonSourcemap {
|
|
1345
1397
|
file?: string;
|
|
1346
1398
|
mappings?: string;
|
|
@@ -1351,12 +1403,6 @@ interface BindingJsonSourcemap {
|
|
|
1351
1403
|
debugId?: string;
|
|
1352
1404
|
x_google_ignoreList?: Array<number>;
|
|
1353
1405
|
}
|
|
1354
|
-
interface BindingManifestPluginConfig {
|
|
1355
|
-
root: string;
|
|
1356
|
-
outPath: string;
|
|
1357
|
-
isLegacy?: () => boolean;
|
|
1358
|
-
cssEntries: () => Record<string, string>;
|
|
1359
|
-
}
|
|
1360
1406
|
interface BindingModulePreloadOptions {
|
|
1361
1407
|
polyfill: boolean;
|
|
1362
1408
|
resolveDependencies?: (filename: string, deps: string[], context: {
|
|
@@ -1364,19 +1410,13 @@ interface BindingModulePreloadOptions {
|
|
|
1364
1410
|
hostType: 'html' | 'js';
|
|
1365
1411
|
}) => string[];
|
|
1366
1412
|
}
|
|
1367
|
-
interface BindingModulePreloadPolyfillPluginConfig {
|
|
1368
|
-
isServer?: boolean;
|
|
1369
|
-
}
|
|
1370
1413
|
interface BindingModules {
|
|
1371
1414
|
values: Array<BindingRenderedModule>;
|
|
1372
1415
|
keys: Array<string>;
|
|
1373
1416
|
}
|
|
1374
|
-
interface
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
exclude?: Array<BindingStringOrRegex>;
|
|
1378
|
-
jsxImportSource: string;
|
|
1379
|
-
reactRefreshHost: string;
|
|
1417
|
+
interface BindingOutputs {
|
|
1418
|
+
chunks: Array<BindingOutputChunk>;
|
|
1419
|
+
assets: Array<BindingOutputAsset>;
|
|
1380
1420
|
}
|
|
1381
1421
|
declare enum BindingRebuildStrategy {
|
|
1382
1422
|
Always = 0,
|
|
@@ -1400,31 +1440,42 @@ interface BindingReplacePluginConfig {
|
|
|
1400
1440
|
objectGuards?: boolean;
|
|
1401
1441
|
sourcemap?: boolean;
|
|
1402
1442
|
}
|
|
1403
|
-
interface BindingReporterPluginConfig {
|
|
1404
|
-
isTty: boolean;
|
|
1405
|
-
isLib: boolean;
|
|
1406
|
-
assetsDir: string;
|
|
1407
|
-
chunkLimit: number;
|
|
1408
|
-
shouldLogInfo: boolean;
|
|
1409
|
-
warnLargeChunks: boolean;
|
|
1410
|
-
reportCompressedSize: boolean;
|
|
1411
|
-
}
|
|
1412
1443
|
interface BindingSourcemap {
|
|
1413
1444
|
inner: string | BindingJsonSourcemap;
|
|
1414
1445
|
}
|
|
1415
1446
|
interface BindingTransformHookExtraArgs {
|
|
1416
1447
|
moduleType: string;
|
|
1417
1448
|
}
|
|
1418
|
-
interface
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1449
|
+
interface BindingViteAssetPluginConfig {
|
|
1450
|
+
root: string;
|
|
1451
|
+
isLib: boolean;
|
|
1452
|
+
isSsr: boolean;
|
|
1453
|
+
isWorker: boolean;
|
|
1454
|
+
urlBase: string;
|
|
1455
|
+
publicDir: string;
|
|
1456
|
+
decodedBase: string;
|
|
1457
|
+
isSkipAssets: boolean;
|
|
1458
|
+
assetsInclude: Array<BindingStringOrRegex>;
|
|
1459
|
+
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1460
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1461
|
+
}
|
|
1462
|
+
interface BindingViteBuildImportAnalysisPluginConfig {
|
|
1463
|
+
preloadCode: string;
|
|
1464
|
+
insertPreload: boolean;
|
|
1465
|
+
optimizeModulePreloadRelativePaths: boolean;
|
|
1466
|
+
renderBuiltUrl: boolean;
|
|
1467
|
+
isRelativeBase: boolean;
|
|
1468
|
+
v2?: BindingViteBuildImportAnalysisPluginV2Config;
|
|
1469
|
+
}
|
|
1470
|
+
interface BindingViteBuildImportAnalysisPluginV2Config {
|
|
1471
|
+
isSsr: boolean;
|
|
1472
|
+
urlBase: string;
|
|
1473
|
+
decodedBase: string;
|
|
1474
|
+
modulePreload: false | BindingModulePreloadOptions;
|
|
1475
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1426
1476
|
}
|
|
1427
1477
|
interface BindingViteCssPluginConfig {
|
|
1478
|
+
root: string;
|
|
1428
1479
|
isLib: boolean;
|
|
1429
1480
|
publicDir: string;
|
|
1430
1481
|
compileCSS: (url: string, importer: string, resolver: BindingUrlResolver) => Promise<{
|
|
@@ -1437,6 +1488,7 @@ interface BindingViteCssPluginConfig {
|
|
|
1437
1488
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1438
1489
|
}
|
|
1439
1490
|
interface BindingViteCssPostPluginConfig {
|
|
1491
|
+
root: string;
|
|
1440
1492
|
isLib: boolean;
|
|
1441
1493
|
isSsr: boolean;
|
|
1442
1494
|
isWorker: boolean;
|
|
@@ -1451,7 +1503,16 @@ interface BindingViteCssPostPluginConfig {
|
|
|
1451
1503
|
cssMinify?: (css: string) => Promise<string>;
|
|
1452
1504
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1453
1505
|
}
|
|
1506
|
+
interface BindingViteDynamicImportVarsPluginConfig {
|
|
1507
|
+
include?: Array<BindingStringOrRegex>;
|
|
1508
|
+
exclude?: Array<BindingStringOrRegex>;
|
|
1509
|
+
resolver?: (id: string, importer: string) => MaybePromise<string | undefined>;
|
|
1510
|
+
}
|
|
1511
|
+
interface BindingViteHtmlInlineProxyPluginConfig {
|
|
1512
|
+
root: string;
|
|
1513
|
+
}
|
|
1454
1514
|
interface BindingViteHtmlPluginConfig {
|
|
1515
|
+
root: string;
|
|
1455
1516
|
isLib: boolean;
|
|
1456
1517
|
isSsr: boolean;
|
|
1457
1518
|
urlBase: string;
|
|
@@ -1461,6 +1522,44 @@ interface BindingViteHtmlPluginConfig {
|
|
|
1461
1522
|
modulePreload: false | BindingModulePreloadOptions;
|
|
1462
1523
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1463
1524
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1525
|
+
transformIndexHtml: (html: string, path: string, filename: string, hook: 'transform' | 'generateBundle', output?: BindingOutputs, chunk?: BindingOutputChunk) => Promise<string>;
|
|
1526
|
+
}
|
|
1527
|
+
interface BindingViteImportGlobPluginConfig {
|
|
1528
|
+
root?: string;
|
|
1529
|
+
restoreQueryExtension?: boolean;
|
|
1530
|
+
}
|
|
1531
|
+
interface BindingViteJsonPluginConfig {
|
|
1532
|
+
minify?: boolean;
|
|
1533
|
+
namedExports?: boolean;
|
|
1534
|
+
stringify?: BindingViteJsonPluginStringify;
|
|
1535
|
+
}
|
|
1536
|
+
type BindingViteJsonPluginStringify = boolean | string;
|
|
1537
|
+
interface BindingViteManifestPluginConfig {
|
|
1538
|
+
root: string;
|
|
1539
|
+
outPath: string;
|
|
1540
|
+
isEnableV2?: boolean;
|
|
1541
|
+
isLegacy?: () => boolean;
|
|
1542
|
+
cssEntries: () => Record<string, string>;
|
|
1543
|
+
}
|
|
1544
|
+
interface BindingViteModulePreloadPolyfillPluginConfig {
|
|
1545
|
+
isServer?: boolean;
|
|
1546
|
+
}
|
|
1547
|
+
interface BindingViteReactRefreshWrapperPluginConfig {
|
|
1548
|
+
cwd: string;
|
|
1549
|
+
include?: Array<BindingStringOrRegex>;
|
|
1550
|
+
exclude?: Array<BindingStringOrRegex>;
|
|
1551
|
+
jsxImportSource: string;
|
|
1552
|
+
reactRefreshHost: string;
|
|
1553
|
+
}
|
|
1554
|
+
interface BindingViteReporterPluginConfig {
|
|
1555
|
+
root: string;
|
|
1556
|
+
isTty: boolean;
|
|
1557
|
+
isLib: boolean;
|
|
1558
|
+
assetsDir: string;
|
|
1559
|
+
chunkLimit: number;
|
|
1560
|
+
shouldLogInfo: boolean;
|
|
1561
|
+
warnLargeChunks: boolean;
|
|
1562
|
+
reportCompressedSize: boolean;
|
|
1464
1563
|
}
|
|
1465
1564
|
interface BindingViteResolvePluginConfig {
|
|
1466
1565
|
resolveOptions: BindingViteResolvePluginResolveOptions;
|
|
@@ -1494,7 +1593,17 @@ interface BindingViteResolvePluginResolveOptions {
|
|
|
1494
1593
|
preserveSymlinks: boolean;
|
|
1495
1594
|
tsconfigPaths: boolean;
|
|
1496
1595
|
}
|
|
1497
|
-
interface
|
|
1596
|
+
interface BindingViteTransformPluginConfig {
|
|
1597
|
+
root: string;
|
|
1598
|
+
include?: Array<BindingStringOrRegex>;
|
|
1599
|
+
exclude?: Array<BindingStringOrRegex>;
|
|
1600
|
+
jsxRefreshInclude?: Array<BindingStringOrRegex>;
|
|
1601
|
+
jsxRefreshExclude?: Array<BindingStringOrRegex>;
|
|
1602
|
+
isServerConsumer?: boolean;
|
|
1603
|
+
jsxInject?: string;
|
|
1604
|
+
transformOptions?: TransformOptions;
|
|
1605
|
+
}
|
|
1606
|
+
interface BindingViteWasmHelperPluginConfig {
|
|
1498
1607
|
decodedBase: string;
|
|
1499
1608
|
}
|
|
1500
1609
|
interface ExternalMemoryStatus {
|
|
@@ -1515,4 +1624,4 @@ interface PreRenderedChunk {
|
|
|
1515
1624
|
exports: Array<string>;
|
|
1516
1625
|
}
|
|
1517
1626
|
//#endregion
|
|
1518
|
-
export {
|
|
1627
|
+
export { ExternalMemoryStatus as A, ResolveResult as B, BindingViteReactRefreshWrapperPluginConfig as C, BindingViteWasmHelperPluginConfig as D, BindingViteTransformPluginConfig as E, MinifyResult as F, isolatedDeclarationSync as G, TransformOptions as H, NapiResolveOptions as I, moduleRunnerTransform as J, minify as K, ParseResult as L, IsolatedDeclarationsResult as M, JsxOptions as N, BindingWatcherBundler as O, MinifyOptions as P, transformSync as Q, ParserOptions as R, BindingViteModulePreloadPolyfillPluginConfig as S, BindingViteResolvePluginConfig as T, TransformResult as U, ResolverFactory as V, isolatedDeclaration as W, parseSync as X, parse as Y, transform as Z, BindingViteHtmlInlineProxyPluginConfig as _, BindingIsolatedDeclarationPluginConfig as a, BindingViteJsonPluginConfig as b, BindingRenderedChunk as c, BindingUrlResolver as d, BindingViteAssetPluginConfig as f, BindingViteDynamicImportVarsPluginConfig as g, BindingViteCssPostPluginConfig as h, BindingHookResolveIdExtraArgs as i, IsolatedDeclarationsOptions as j, BindingWatcherEvent as k, BindingReplacePluginConfig as l, BindingViteCssPluginConfig as m, BindingClientHmrUpdate as n, BindingMagicString as o, BindingViteBuildImportAnalysisPluginConfig as p, minifySync as q, BindingEsmExternalRequirePluginConfig as r, BindingRebuildStrategy as s, BindingBuiltinPluginName as t, BindingTransformHookExtraArgs as u, BindingViteHtmlPluginConfig as v, BindingViteReporterPluginConfig as w, BindingViteManifestPluginConfig as x, BindingViteImportGlobPluginConfig as y, PreRenderedChunk as z };
|