@rolldown/browser 1.0.0-beta.47 → 1.0.0-beta.49
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 +22 -9
- package/dist/config.d.mts +3 -2
- package/dist/config.mjs +6 -4
- package/dist/constructors-EhfoQfqh.js +68 -0
- package/dist/experimental-index.browser.mjs +36 -106
- package/dist/experimental-index.d.mts +18 -58
- package/dist/experimental-index.mjs +39 -108
- package/dist/filter-index.d.mts +3 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/index.browser.mjs +2 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +5 -3
- package/dist/{shared/parse-ast-index-BiBzSGZe.mjs → normalize-string-or-regex-d47jXr3r.js} +38 -109
- package/dist/parallel-plugin-worker.mjs +5 -3
- package/dist/parallel-plugin.d.mts +3 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -1
- package/dist/plugins-index.browser.mjs +39 -0
- package/dist/plugins-index.d.mts +31 -0
- package/dist/plugins-index.mjs +40 -0
- package/dist/rolldown-binding.wasi-browser.js +1 -1
- package/dist/rolldown-binding.wasi.cjs +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-CRSqCQIK.d.mts → binding-B4uTNiw2.d.mts} +19 -49
- package/dist/shared/constructors-CaN9lKj2.d.mts +32 -0
- package/dist/shared/constructors-DcEzB0nc.mjs +68 -0
- package/dist/shared/{define-config-pfDd6Le4.d.mts → define-config-BAQ9c-hh.d.mts} +7 -64
- package/dist/shared/{load-config-D508WsWM.mjs → load-config-DQI-2sfE.mjs} +1 -1
- package/dist/shared/logs-CPsamAuj.mjs +181 -0
- package/dist/shared/normalize-string-or-regex-CbDij6KB.mjs +46 -0
- package/dist/shared/parse-ast-index-D9jH_38U.mjs +81 -0
- package/dist/shared/{prompt-BDwA3jSr.mjs → prompt-Ckjl2FdJ.mjs} +1 -1
- package/dist/shared/{src-DE7RBSfl.mjs → src-CZ_U2fML.mjs} +218 -191
- package/dist/shared/utils-CduIqa7h.d.mts +18 -0
- package/dist/{src-Deywlnh0.js → src-CnMyHYgB.js} +203 -405
- package/package.json +1 -1
- /package/dist/shared/{composable-filters-D_PY7Qa7.mjs → composable-filters-CBpK2Fbc.mjs} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { R as PreRenderedChunk,
|
|
1
|
+
import { $ as NormalizedOutputOptions, A as VERSION, At as LogLevel, B as PluginContext, C as ResolveIdResult, Ct as RenderedChunk, D as SourceDescription, E as RolldownPluginOption, Et as SourceMap, F as TreeshakingOptions, Ft as RollupLogWithString, G as GeneralHookFilter, I as TransformPluginContext, J as BufferEncoding, K as HookFilter, L as EmittedAsset, M as SourceMapInput, Mt as LogOrStringHandler, N as RolldownOptionsFunction, Nt as RollupError, O as TransformResult, Ot as ModuleInfo, P as OutputBundle, Pt as RollupLog, Q as InternalModuleFormat, R as EmittedFile, S as ResolveIdExtraOptions, St as OutputChunk, T as RolldownPlugin, Tt as RolldownOutput, U as MinimalPluginContext, V as DefineParallelPluginResult, W as PluginContextMeta, X as RolldownFileStats, Y as RolldownDirectoryEntry, Z as RolldownFsModule, _ as ModuleType, _t as MinifyOptions, a as InputOption, at as RolldownWatcherEvent, b as PartialResolvedId, bt as PreRenderedAsset, c as OptimizationOptions, ct as RolldownBuild, d as CustomPluginOptions, dt as AddonFunction, et as NormalizedInputOptions, f as FunctionPluginHooks, ft as ChunkFileNamesFunction, g as ModuleOptions, gt as GlobalsFunction, h as LoadResult, ht as GeneratedCodePreset, i as ExternalOption, it as RolldownWatcher, j as ExistingRawSourceMap, jt as LogLevelOption, kt as SourcemapIgnoreListOption, l as WatcherOptions, lt as BuildOptions, m as ImportKind, mt as GeneratedCodeOptions, n as ConfigExport, nt as WarningHandlerWithDefault, o as InputOptions, ot as WatchOptions, p as HookFilterExtension, pt as ChunkingContext, q as ModuleTypeFilter, r as RolldownOptions, rt as watch, s as ModuleTypes, st as rolldown, t as defineConfig, tt as LoggingFunction, u as AsyncPluginHooks, ut as build, v as ObjectHook, vt as ModuleFormat, w as ResolvedId, wt as RenderedModule, x as Plugin, xt as OutputAsset, y as ParallelPluginHooks, yt as OutputOptions, z as GetModuleInfo } from "./shared/define-config-BAQ9c-hh.mjs";
|
|
2
|
+
import { R as PreRenderedChunk, d as BindingMagicString } from "./shared/binding-B4uTNiw2.mjs";
|
|
3
|
+
import { o as PartialNull } from "./shared/utils-CduIqa7h.mjs";
|
|
3
4
|
export { AddonFunction, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./shared/src-
|
|
2
|
-
import "./shared/
|
|
3
|
-
import "./shared/
|
|
1
|
+
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./shared/src-CZ_U2fML.mjs";
|
|
2
|
+
import "./shared/logs-CPsamAuj.mjs";
|
|
3
|
+
import "./shared/normalize-string-or-regex-CbDij6KB.mjs";
|
|
4
|
+
import "./shared/composable-filters-CBpK2Fbc.mjs";
|
|
5
|
+
import "./shared/parse-ast-index-D9jH_38U.mjs";
|
|
4
6
|
|
|
5
7
|
export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { styleText } from "node:util";
|
|
1
|
+
import { BindingCallableBuiltinPlugin } from "./rolldown-binding.wasi-browser.js";
|
|
3
2
|
|
|
4
3
|
//#region src/utils/code-frame.ts
|
|
5
4
|
function spaces(index) {
|
|
@@ -39,17 +38,6 @@ function getCodeFrame(source, line, column) {
|
|
|
39
38
|
}).join("\n");
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/utils/style-text.ts
|
|
44
|
-
/**
|
|
45
|
-
* Cross-platform styleText utility that works in both Node.js and browser environments
|
|
46
|
-
* In Node.js, it uses the native `styleText` from `node:util`
|
|
47
|
-
* In browser, it provides empty styling functions for compatibility
|
|
48
|
-
*/
|
|
49
|
-
function styleText$1(...args) {
|
|
50
|
-
return styleText(...args);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
41
|
//#endregion
|
|
54
42
|
//#region src/log/locate-character/index.js
|
|
55
43
|
/** @typedef {import('./types').Location} Location */
|
|
@@ -113,7 +101,7 @@ function locate(source, search, options) {
|
|
|
113
101
|
|
|
114
102
|
//#endregion
|
|
115
103
|
//#region src/log/logs.ts
|
|
116
|
-
const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER"
|
|
104
|
+
const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER";
|
|
117
105
|
function logParseError(message) {
|
|
118
106
|
return {
|
|
119
107
|
code: PARSE_ERROR,
|
|
@@ -144,34 +132,10 @@ function logMultiplyNotifyOption() {
|
|
|
144
132
|
message: `Found multiply notify option at watch options, using first one to start notify watcher.`
|
|
145
133
|
};
|
|
146
134
|
}
|
|
147
|
-
function
|
|
148
|
-
return {
|
|
149
|
-
code: DEPRECATED_DEFINE,
|
|
150
|
-
message: `${styleText$1(["yellow", "bold"], "⚠ Deprecation Warning:")} The top-level "define" option is deprecated. Use "transform.define" instead.`
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
function logDeprecatedInject() {
|
|
154
|
-
return {
|
|
155
|
-
code: DEPRECATED_INJECT,
|
|
156
|
-
message: `${styleText$1(["yellow", "bold"], "⚠ Deprecation Warning:")} The top-level "inject" option is deprecated. Use "transform.inject" instead.`
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function logDeprecatedProfilerNames() {
|
|
160
|
-
return {
|
|
161
|
-
code: DEPRECATED_PROFILER_NAMES,
|
|
162
|
-
message: "The top-level \"profilerNames\" option is deprecated. Use \"output.generatedCode.profilerNames\" instead."
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function logDeprecatedKeepNames() {
|
|
135
|
+
function logNoFileSystemInBrowser(method) {
|
|
166
136
|
return {
|
|
167
|
-
code:
|
|
168
|
-
message:
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function logDeprecatedDropLabels() {
|
|
172
|
-
return {
|
|
173
|
-
code: DEPRECATED_DROP_LABELS,
|
|
174
|
-
message: `${styleText$1(["yellow", "bold"], "⚠ Deprecation Warning:")} The top-level "dropLabels" option is deprecated. Use "transform.dropLabels" instead.`
|
|
137
|
+
code: NO_FS_IN_BROWSER,
|
|
138
|
+
message: `Cannot access the file system (via "${method}") when using the browser build of Rolldown.`
|
|
175
139
|
};
|
|
176
140
|
}
|
|
177
141
|
function logPluginError(error$1, plugin, { hook, id } = {}) {
|
|
@@ -222,81 +186,46 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
222
186
|
}
|
|
223
187
|
|
|
224
188
|
//#endregion
|
|
225
|
-
//#region
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
189
|
+
//#region src/builtin-plugin/utils.ts
|
|
190
|
+
var BuiltinPlugin = class {
|
|
191
|
+
constructor(name, _options) {
|
|
192
|
+
this.name = name;
|
|
193
|
+
this._options = _options;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
function makeBuiltinPluginCallable(plugin) {
|
|
197
|
+
let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
|
|
198
|
+
const wrappedPlugin = plugin;
|
|
199
|
+
for (const key in callablePlugin) wrappedPlugin[key] = async function(...args) {
|
|
200
|
+
try {
|
|
201
|
+
return await callablePlugin[key](...args);
|
|
202
|
+
} catch (e) {
|
|
203
|
+
if (e instanceof Error && !e.stack?.includes("at ")) Error.captureStackTrace(e, wrappedPlugin[key]);
|
|
204
|
+
return error(logPluginError(e, plugin.name, {
|
|
205
|
+
hook: key,
|
|
206
|
+
id: key === "transform" ? args[2] : void 0
|
|
207
|
+
}));
|
|
244
208
|
}
|
|
245
209
|
};
|
|
210
|
+
return wrappedPlugin;
|
|
246
211
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
function applyFix(program, fixPath) {
|
|
253
|
-
let node = program;
|
|
254
|
-
for (const key of fixPath) node = node[key];
|
|
255
|
-
if (node.bigint) node.value = BigInt(node.bigint);
|
|
256
|
-
else try {
|
|
257
|
-
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
258
|
-
} catch {}
|
|
212
|
+
function bindingifyBuiltInPlugin(plugin) {
|
|
213
|
+
return {
|
|
214
|
+
__name: plugin.name,
|
|
215
|
+
options: plugin._options
|
|
216
|
+
};
|
|
259
217
|
}
|
|
260
218
|
|
|
261
219
|
//#endregion
|
|
262
|
-
//#region src/
|
|
263
|
-
function
|
|
264
|
-
|
|
265
|
-
if (
|
|
266
|
-
return
|
|
267
|
-
}
|
|
268
|
-
function normalizeParseError(sourceText, errors) {
|
|
269
|
-
let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
270
|
-
for (let i = 0; i < errors.length; i++) {
|
|
271
|
-
if (i >= 5) {
|
|
272
|
-
message += "\n...";
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
const e = errors[i];
|
|
276
|
-
message += e.message + "\n" + e.labels.map((label) => {
|
|
277
|
-
const location = locate(sourceText, label.start, { offsetLine: 1 });
|
|
278
|
-
if (!location) return;
|
|
279
|
-
return getCodeFrame(sourceText, location.line, location.column);
|
|
280
|
-
}).filter(Boolean).join("\n");
|
|
281
|
-
}
|
|
282
|
-
return error(logParseError(message));
|
|
283
|
-
}
|
|
284
|
-
const defaultParserOptions = {
|
|
285
|
-
lang: "js",
|
|
286
|
-
preserveParens: false
|
|
287
|
-
};
|
|
288
|
-
function parseAst(sourceText, options, filename) {
|
|
289
|
-
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
290
|
-
...defaultParserOptions,
|
|
291
|
-
...options
|
|
292
|
-
}), sourceText);
|
|
220
|
+
//#region src/utils/normalize-string-or-regex.ts
|
|
221
|
+
function normalizedStringOrRegex(pattern) {
|
|
222
|
+
if (!pattern) return;
|
|
223
|
+
if (!isReadonlyArray(pattern)) return [pattern];
|
|
224
|
+
return pattern;
|
|
293
225
|
}
|
|
294
|
-
|
|
295
|
-
return
|
|
296
|
-
...defaultParserOptions,
|
|
297
|
-
...options
|
|
298
|
-
}), sourceText);
|
|
226
|
+
function isReadonlyArray(input) {
|
|
227
|
+
return Array.isArray(input);
|
|
299
228
|
}
|
|
300
229
|
|
|
301
230
|
//#endregion
|
|
302
|
-
export {
|
|
231
|
+
export { augmentCodeLocation as a, logInputHookInOutputPlugin as c, logNoFileSystemInBrowser as d, logParseError as f, getCodeFrame as h, makeBuiltinPluginCallable as i, logInvalidLogPosition as l, locate as m, BuiltinPlugin as n, error as o, logPluginError as p, bindingifyBuiltInPlugin as r, logCycleLoading as s, normalizedStringOrRegex as t, logMultiplyNotifyOption as u };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./shared/
|
|
3
|
-
import "./shared/
|
|
1
|
+
import { l as PluginContextData, u as bindingifyPlugin } from "./shared/src-CZ_U2fML.mjs";
|
|
2
|
+
import "./shared/logs-CPsamAuj.mjs";
|
|
3
|
+
import "./shared/normalize-string-or-regex-CbDij6KB.mjs";
|
|
4
|
+
import "./shared/composable-filters-CBpK2Fbc.mjs";
|
|
5
|
+
import "./shared/parse-ast-index-D9jH_38U.mjs";
|
|
4
6
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
7
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
8
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./shared/binding-
|
|
1
|
+
import { x as Plugin } from "./shared/define-config-BAQ9c-hh.mjs";
|
|
2
|
+
import "./shared/binding-B4uTNiw2.mjs";
|
|
3
|
+
import { i as MaybePromise } from "./shared/utils-CduIqa7h.mjs";
|
|
3
4
|
|
|
4
5
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
6
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { i as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-d47jXr3r.js";
|
|
2
|
+
import { r as esmExternalRequirePlugin } from "./constructors-EhfoQfqh.js";
|
|
3
|
+
|
|
4
|
+
//#region src/builtin-plugin/replace-plugin.ts
|
|
5
|
+
/**
|
|
6
|
+
* Replaces targeted strings in files while bundling.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Basic usage
|
|
10
|
+
* ```js
|
|
11
|
+
* replacePlugin({
|
|
12
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
13
|
+
* __buildVersion: 15
|
|
14
|
+
* })
|
|
15
|
+
* ```
|
|
16
|
+
* @example
|
|
17
|
+
* // With options
|
|
18
|
+
* ```js
|
|
19
|
+
* replacePlugin({
|
|
20
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
21
|
+
* __buildVersion: 15
|
|
22
|
+
* }, {
|
|
23
|
+
* preventAssignment: false,
|
|
24
|
+
* })
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
function replacePlugin(values = {}, options = {}) {
|
|
28
|
+
Object.keys(values).forEach((key) => {
|
|
29
|
+
const value = values[key];
|
|
30
|
+
if (typeof value !== "string") values[key] = String(value);
|
|
31
|
+
});
|
|
32
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:replace", {
|
|
33
|
+
...options,
|
|
34
|
+
values
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { esmExternalRequirePlugin, replacePlugin };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { _ as BindingReplacePluginConfig } from "./shared/binding-B4uTNiw2.mjs";
|
|
2
|
+
import { t as BuiltinPlugin } from "./shared/utils-CduIqa7h.mjs";
|
|
3
|
+
import { r as esmExternalRequirePlugin } from "./shared/constructors-CaN9lKj2.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Replaces targeted strings in files while bundling.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Basic usage
|
|
12
|
+
* ```js
|
|
13
|
+
* replacePlugin({
|
|
14
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
15
|
+
* __buildVersion: 15
|
|
16
|
+
* })
|
|
17
|
+
* ```
|
|
18
|
+
* @example
|
|
19
|
+
* // With options
|
|
20
|
+
* ```js
|
|
21
|
+
* replacePlugin({
|
|
22
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
23
|
+
* __buildVersion: 15
|
|
24
|
+
* }, {
|
|
25
|
+
* preventAssignment: false,
|
|
26
|
+
* })
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { esmExternalRequirePlugin, replacePlugin };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "./shared/logs-CPsamAuj.mjs";
|
|
2
|
+
import { i as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-CbDij6KB.mjs";
|
|
3
|
+
import { r as esmExternalRequirePlugin } from "./shared/constructors-DcEzB0nc.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/builtin-plugin/replace-plugin.ts
|
|
6
|
+
/**
|
|
7
|
+
* Replaces targeted strings in files while bundling.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Basic usage
|
|
11
|
+
* ```js
|
|
12
|
+
* replacePlugin({
|
|
13
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
14
|
+
* __buildVersion: 15
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
* @example
|
|
18
|
+
* // With options
|
|
19
|
+
* ```js
|
|
20
|
+
* replacePlugin({
|
|
21
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
22
|
+
* __buildVersion: 15
|
|
23
|
+
* }, {
|
|
24
|
+
* preventAssignment: false,
|
|
25
|
+
* })
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
function replacePlugin(values = {}, options = {}) {
|
|
29
|
+
Object.keys(values).forEach((key) => {
|
|
30
|
+
const value = values[key];
|
|
31
|
+
if (typeof value !== "string") values[key] = String(value);
|
|
32
|
+
});
|
|
33
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:replace", {
|
|
34
|
+
...options,
|
|
35
|
+
values
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { esmExternalRequirePlugin, replacePlugin };
|
|
@@ -85,7 +85,6 @@ export const transformAsync = __napiModule.exports.transformAsync
|
|
|
85
85
|
export const BindingBundleEndEventData = __napiModule.exports.BindingBundleEndEventData
|
|
86
86
|
export const BindingBundleErrorEventData = __napiModule.exports.BindingBundleErrorEventData
|
|
87
87
|
export const BindingBundler = __napiModule.exports.BindingBundler
|
|
88
|
-
export const BindingBundlerImpl = __napiModule.exports.BindingBundlerImpl
|
|
89
88
|
export const BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallableBuiltinPlugin
|
|
90
89
|
export const BindingChunkingContext = __napiModule.exports.BindingChunkingContext
|
|
91
90
|
export const BindingDevEngine = __napiModule.exports.BindingDevEngine
|
|
@@ -101,6 +100,7 @@ export const BindingRenderedModule = __napiModule.exports.BindingRenderedModule
|
|
|
101
100
|
export const BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext
|
|
102
101
|
export const BindingUrlResolver = __napiModule.exports.BindingUrlResolver
|
|
103
102
|
export const BindingWatcher = __napiModule.exports.BindingWatcher
|
|
103
|
+
export const BindingWatcherBundler = __napiModule.exports.BindingWatcherBundler
|
|
104
104
|
export const BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
105
105
|
export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
106
106
|
export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
@@ -130,7 +130,6 @@ module.exports.transformAsync = __napiModule.exports.transformAsync
|
|
|
130
130
|
module.exports.BindingBundleEndEventData = __napiModule.exports.BindingBundleEndEventData
|
|
131
131
|
module.exports.BindingBundleErrorEventData = __napiModule.exports.BindingBundleErrorEventData
|
|
132
132
|
module.exports.BindingBundler = __napiModule.exports.BindingBundler
|
|
133
|
-
module.exports.BindingBundlerImpl = __napiModule.exports.BindingBundlerImpl
|
|
134
133
|
module.exports.BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallableBuiltinPlugin
|
|
135
134
|
module.exports.BindingChunkingContext = __napiModule.exports.BindingChunkingContext
|
|
136
135
|
module.exports.BindingDevEngine = __napiModule.exports.BindingDevEngine
|
|
@@ -146,6 +145,7 @@ module.exports.BindingRenderedModule = __napiModule.exports.BindingRenderedModul
|
|
|
146
145
|
module.exports.BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext
|
|
147
146
|
module.exports.BindingUrlResolver = __napiModule.exports.BindingUrlResolver
|
|
148
147
|
module.exports.BindingWatcher = __napiModule.exports.BindingWatcher
|
|
148
|
+
module.exports.BindingWatcherBundler = __napiModule.exports.BindingWatcherBundler
|
|
149
149
|
module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
150
150
|
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
151
151
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
Binary file
|
|
@@ -4,10 +4,6 @@ import * as _oxc_project_types0 from "@oxc-project/types";
|
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
5
5
|
type VoidNullable<T = void> = T | null | undefined | void;
|
|
6
6
|
type BindingStringOrRegex = string | RegExp;
|
|
7
|
-
type BindingResult<T> = {
|
|
8
|
-
errors: BindingError[];
|
|
9
|
-
isBindingErrors: boolean;
|
|
10
|
-
} | T;
|
|
11
7
|
interface CodegenOptions {
|
|
12
8
|
/**
|
|
13
9
|
* Remove whitespace.
|
|
@@ -234,6 +230,12 @@ type ImportNameKind = /** `import { x } from "mod"` */
|
|
|
234
230
|
'Name' | /** `import * as ns from "mod"` */
|
|
235
231
|
'NamespaceObject' | /** `import defaultExport from "mod"` */
|
|
236
232
|
'Default';
|
|
233
|
+
/**
|
|
234
|
+
* Parse asynchronously.
|
|
235
|
+
*
|
|
236
|
+
* Note: This function can be slower than `parseSync` due to the overhead of spawning a thread.
|
|
237
|
+
*/
|
|
238
|
+
declare function parseAsync(filename: string, sourceText: string, options?: ParserOptions | undefined | null): Promise<ParseResult>;
|
|
237
239
|
interface ParserOptions {
|
|
238
240
|
/** Treat the source text as `js`, `jsx`, `ts`, `tsx` or `dts`. */
|
|
239
241
|
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts';
|
|
@@ -274,6 +276,8 @@ interface ParserOptions {
|
|
|
274
276
|
*/
|
|
275
277
|
showSemanticErrors?: boolean;
|
|
276
278
|
}
|
|
279
|
+
/** Parse synchronously. */
|
|
280
|
+
declare function parseSync(filename: string, sourceText: string, options?: ParserOptions | undefined | null): ParseResult;
|
|
277
281
|
interface Span {
|
|
278
282
|
start: number;
|
|
279
283
|
end: number;
|
|
@@ -1182,20 +1186,12 @@ interface TypeScriptOptions {
|
|
|
1182
1186
|
declare class BindingBundleEndEventData {
|
|
1183
1187
|
output: string;
|
|
1184
1188
|
duration: number;
|
|
1185
|
-
get result():
|
|
1189
|
+
get result(): BindingWatcherBundler;
|
|
1186
1190
|
}
|
|
1187
1191
|
declare class BindingBundleErrorEventData {
|
|
1188
|
-
get result():
|
|
1192
|
+
get result(): BindingWatcherBundler;
|
|
1189
1193
|
get error(): Array<BindingError>;
|
|
1190
1194
|
}
|
|
1191
|
-
declare class BindingBundlerImpl {
|
|
1192
|
-
write(): Promise<BindingResult<BindingOutputs>>;
|
|
1193
|
-
generate(): Promise<BindingResult<BindingOutputs>>;
|
|
1194
|
-
scan(): Promise<BindingResult<BindingOutputs>>;
|
|
1195
|
-
close(): Promise<void>;
|
|
1196
|
-
get closed(): boolean;
|
|
1197
|
-
getWatchFiles(): Promise<Array<string>>;
|
|
1198
|
-
}
|
|
1199
1195
|
declare class BindingMagicString {
|
|
1200
1196
|
constructor(source: string);
|
|
1201
1197
|
replace(from: string, to: string): void;
|
|
@@ -1216,32 +1212,6 @@ declare class BindingMagicString {
|
|
|
1216
1212
|
relocate(start: number, end: number, to: number): void;
|
|
1217
1213
|
indent(indentor?: string | undefined | null): void;
|
|
1218
1214
|
}
|
|
1219
|
-
declare class BindingOutputAsset {
|
|
1220
|
-
dropInner(): ExternalMemoryStatus;
|
|
1221
|
-
getFileName(): string;
|
|
1222
|
-
getOriginalFileName(): string | null;
|
|
1223
|
-
getOriginalFileNames(): Array<string>;
|
|
1224
|
-
getSource(): BindingAssetSource;
|
|
1225
|
-
getName(): string | null;
|
|
1226
|
-
getNames(): Array<string>;
|
|
1227
|
-
}
|
|
1228
|
-
declare class BindingOutputChunk {
|
|
1229
|
-
dropInner(): ExternalMemoryStatus;
|
|
1230
|
-
getIsEntry(): boolean;
|
|
1231
|
-
getIsDynamicEntry(): boolean;
|
|
1232
|
-
getFacadeModuleId(): string | null;
|
|
1233
|
-
getModuleIds(): Array<string>;
|
|
1234
|
-
getExports(): Array<string>;
|
|
1235
|
-
getFileName(): string;
|
|
1236
|
-
getModules(): BindingModules;
|
|
1237
|
-
getImports(): Array<string>;
|
|
1238
|
-
getDynamicImports(): Array<string>;
|
|
1239
|
-
getCode(): string;
|
|
1240
|
-
getMap(): string | null;
|
|
1241
|
-
getSourcemapFileName(): string | null;
|
|
1242
|
-
getPreliminaryFileName(): string;
|
|
1243
|
-
getName(): string;
|
|
1244
|
-
}
|
|
1245
1215
|
declare class BindingRenderedChunk {
|
|
1246
1216
|
get name(): string;
|
|
1247
1217
|
get isEntry(): boolean;
|
|
@@ -1261,6 +1231,13 @@ declare class BindingRenderedModule {
|
|
|
1261
1231
|
declare class BindingUrlResolver {
|
|
1262
1232
|
call(url: string, importer?: string): Promise<[string, string | undefined]>;
|
|
1263
1233
|
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Minimal wrapper around the core `Bundler` for watcher events.
|
|
1236
|
+
* This is returned from watcher event data to allow access to the bundler instance.
|
|
1237
|
+
*/
|
|
1238
|
+
declare class BindingWatcherBundler {
|
|
1239
|
+
close(): Promise<void>;
|
|
1240
|
+
}
|
|
1264
1241
|
declare class BindingWatcherChangeData {
|
|
1265
1242
|
path: string;
|
|
1266
1243
|
kind: string;
|
|
@@ -1284,9 +1261,6 @@ interface BindingAssetPluginConfig {
|
|
|
1284
1261
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1285
1262
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1286
1263
|
}
|
|
1287
|
-
interface BindingAssetSource {
|
|
1288
|
-
inner: string | Uint8Array;
|
|
1289
|
-
}
|
|
1290
1264
|
interface BindingBuildImportAnalysisPluginConfig {
|
|
1291
1265
|
preloadCode: string;
|
|
1292
1266
|
insertPreload: boolean;
|
|
@@ -1302,7 +1276,7 @@ interface BindingBuildImportAnalysisPluginV2Config {
|
|
|
1302
1276
|
modulePreload: false | BindingModulePreloadOptions;
|
|
1303
1277
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1304
1278
|
}
|
|
1305
|
-
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:esm-external-require' | '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';
|
|
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';
|
|
1306
1280
|
interface BindingClientHmrUpdate {
|
|
1307
1281
|
clientId: string;
|
|
1308
1282
|
update: BindingHmrUpdate;
|
|
@@ -1397,10 +1371,6 @@ interface BindingModules {
|
|
|
1397
1371
|
values: Array<BindingRenderedModule>;
|
|
1398
1372
|
keys: Array<string>;
|
|
1399
1373
|
}
|
|
1400
|
-
interface BindingOutputs {
|
|
1401
|
-
chunks: Array<BindingOutputChunk>;
|
|
1402
|
-
assets: Array<BindingOutputAsset>;
|
|
1403
|
-
}
|
|
1404
1374
|
interface BindingReactRefreshWrapperPluginConfig {
|
|
1405
1375
|
cwd: string;
|
|
1406
1376
|
include?: Array<BindingStringOrRegex>;
|
|
@@ -1545,4 +1515,4 @@ interface PreRenderedChunk {
|
|
|
1545
1515
|
exports: Array<string>;
|
|
1546
1516
|
}
|
|
1547
1517
|
//#endregion
|
|
1548
|
-
export { IsolatedDeclarationsOptions as A, ResolverFactory as B,
|
|
1518
|
+
export { IsolatedDeclarationsOptions as A, ResolverFactory as B, BindingViteCssPostPluginConfig as C, BindingWatcherBundler as D, BindingWasmHelperPluginConfig as E, NapiResolveOptions as F, moduleRunnerTransform as G, TransformResult as H, ParseResult as I, transform as J, parseAsync as K, ParserOptions as L, JsxOptions as M, MinifyOptions as N, BindingWatcherEvent as O, MinifyResult as P, PreRenderedChunk as R, BindingViteCssPluginConfig as S, BindingViteResolvePluginConfig as T, isolatedDeclaration as U, TransformOptions as V, minify as W, BindingReplacePluginConfig as _, BindingDynamicImportVarsPluginConfig as a, BindingTransformPluginConfig as b, BindingImportGlobPluginConfig as c, BindingMagicString as d, BindingManifestPluginConfig as f, BindingRenderedChunk as g, BindingRebuildStrategy as h, BindingClientHmrUpdate as i, IsolatedDeclarationsResult as j, ExternalMemoryStatus as k, BindingIsolatedDeclarationPluginConfig as l, BindingReactRefreshWrapperPluginConfig as m, BindingBuildImportAnalysisPluginConfig as n, BindingEsmExternalRequirePluginConfig as o, BindingModulePreloadPolyfillPluginConfig as p, parseSync as q, BindingBuiltinPluginName as r, BindingHookResolveIdExtraArgs as s, BindingAssetPluginConfig as t, BindingJsonPluginConfig as u, BindingReporterPluginConfig as v, BindingViteHtmlPluginConfig as w, BindingUrlResolver as x, BindingTransformHookExtraArgs as y, ResolveResult as z };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { C as BindingViteCssPostPluginConfig, E as BindingWasmHelperPluginConfig, T as BindingViteResolvePluginConfig, a as BindingDynamicImportVarsPluginConfig, c as BindingImportGlobPluginConfig, f as BindingManifestPluginConfig, l as BindingIsolatedDeclarationPluginConfig, m as BindingReactRefreshWrapperPluginConfig, n as BindingBuildImportAnalysisPluginConfig, o as BindingEsmExternalRequirePluginConfig, p as BindingModulePreloadPolyfillPluginConfig, u as BindingJsonPluginConfig, v as BindingReporterPluginConfig, w as BindingViteHtmlPluginConfig } from "./binding-B4uTNiw2.mjs";
|
|
2
|
+
import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-CduIqa7h.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/builtin-plugin/constructors.d.ts
|
|
5
|
+
declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
6
|
+
type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
|
|
7
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
8
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
9
|
+
};
|
|
10
|
+
declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
11
|
+
declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
|
|
12
|
+
declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
|
|
13
|
+
declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
|
|
14
|
+
declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
|
|
15
|
+
declare function wasmFallbackPlugin(): BuiltinPlugin;
|
|
16
|
+
declare function loadFallbackPlugin(): BuiltinPlugin;
|
|
17
|
+
declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
|
|
18
|
+
declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuiltinPlugin;
|
|
19
|
+
declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
|
|
20
|
+
declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
|
|
21
|
+
declare function webWorkerPostPlugin(): BuiltinPlugin;
|
|
22
|
+
declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
|
|
23
|
+
type ReactRefreshWrapperPluginConfig = Omit<BindingReactRefreshWrapperPluginConfig, "include" | "exclude"> & {
|
|
24
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
25
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
26
|
+
};
|
|
27
|
+
declare function reactRefreshWrapperPlugin(config: ReactRefreshWrapperPluginConfig): BuiltinPlugin;
|
|
28
|
+
declare function viteCSSPostPlugin(config?: BindingViteCssPostPluginConfig): BuiltinPlugin;
|
|
29
|
+
declare function viteHtmlPlugin(config?: BindingViteHtmlPluginConfig): BuiltinPlugin;
|
|
30
|
+
declare function htmlInlineProxyPlugin(): BuiltinPlugin;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { wasmHelperPlugin as _, importGlobPlugin as a, loadFallbackPlugin as c, reactRefreshWrapperPlugin as d, reporterPlugin as f, wasmFallbackPlugin as g, viteResolvePlugin as h, htmlInlineProxyPlugin as i, manifestPlugin as l, viteHtmlPlugin as m, dynamicImportVarsPlugin as n, isolatedDeclarationPlugin as o, viteCSSPostPlugin as p, esmExternalRequirePlugin as r, jsonPlugin as s, buildImportAnalysisPlugin as t, modulePreloadPolyfillPlugin as u, webWorkerPostPlugin as v };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { i as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-CbDij6KB.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/builtin-plugin/constructors.ts
|
|
4
|
+
function modulePreloadPolyfillPlugin(config) {
|
|
5
|
+
return new BuiltinPlugin("builtin:module-preload-polyfill", config);
|
|
6
|
+
}
|
|
7
|
+
function dynamicImportVarsPlugin(config) {
|
|
8
|
+
if (config) {
|
|
9
|
+
config.include = normalizedStringOrRegex(config.include);
|
|
10
|
+
config.exclude = normalizedStringOrRegex(config.exclude);
|
|
11
|
+
}
|
|
12
|
+
return new BuiltinPlugin("builtin:dynamic-import-vars", config);
|
|
13
|
+
}
|
|
14
|
+
function importGlobPlugin(config) {
|
|
15
|
+
return new BuiltinPlugin("builtin:import-glob", config);
|
|
16
|
+
}
|
|
17
|
+
function reporterPlugin(config) {
|
|
18
|
+
return new BuiltinPlugin("builtin:reporter", config);
|
|
19
|
+
}
|
|
20
|
+
function manifestPlugin(config) {
|
|
21
|
+
return new BuiltinPlugin("builtin:manifest", config);
|
|
22
|
+
}
|
|
23
|
+
function wasmHelperPlugin(config) {
|
|
24
|
+
return new BuiltinPlugin("builtin:wasm-helper", config);
|
|
25
|
+
}
|
|
26
|
+
function wasmFallbackPlugin() {
|
|
27
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:wasm-fallback"));
|
|
28
|
+
}
|
|
29
|
+
function loadFallbackPlugin() {
|
|
30
|
+
return new BuiltinPlugin("builtin:load-fallback");
|
|
31
|
+
}
|
|
32
|
+
function jsonPlugin(config) {
|
|
33
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:json", config));
|
|
34
|
+
}
|
|
35
|
+
function buildImportAnalysisPlugin(config) {
|
|
36
|
+
return new BuiltinPlugin("builtin:build-import-analysis", config);
|
|
37
|
+
}
|
|
38
|
+
function viteResolvePlugin(config) {
|
|
39
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-resolve", config));
|
|
40
|
+
}
|
|
41
|
+
function isolatedDeclarationPlugin(config) {
|
|
42
|
+
return new BuiltinPlugin("builtin:isolated-declaration", config);
|
|
43
|
+
}
|
|
44
|
+
function webWorkerPostPlugin() {
|
|
45
|
+
return new BuiltinPlugin("builtin:web-worker-post");
|
|
46
|
+
}
|
|
47
|
+
function esmExternalRequirePlugin(config) {
|
|
48
|
+
return new BuiltinPlugin("builtin:esm-external-require", config);
|
|
49
|
+
}
|
|
50
|
+
function reactRefreshWrapperPlugin(config) {
|
|
51
|
+
if (config) {
|
|
52
|
+
config.include = normalizedStringOrRegex(config.include);
|
|
53
|
+
config.exclude = normalizedStringOrRegex(config.exclude);
|
|
54
|
+
}
|
|
55
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:react-refresh-wrapper", config));
|
|
56
|
+
}
|
|
57
|
+
function viteCSSPostPlugin(config) {
|
|
58
|
+
return new BuiltinPlugin("builtin:vite-css-post", config);
|
|
59
|
+
}
|
|
60
|
+
function viteHtmlPlugin(config) {
|
|
61
|
+
return new BuiltinPlugin("builtin:vite-html", config);
|
|
62
|
+
}
|
|
63
|
+
function htmlInlineProxyPlugin() {
|
|
64
|
+
return new BuiltinPlugin("builtin:html-inline-proxy");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
export { wasmHelperPlugin as _, importGlobPlugin as a, loadFallbackPlugin as c, reactRefreshWrapperPlugin as d, reporterPlugin as f, wasmFallbackPlugin as g, viteResolvePlugin as h, htmlInlineProxyPlugin as i, manifestPlugin as l, viteHtmlPlugin as m, dynamicImportVarsPlugin as n, isolatedDeclarationPlugin as o, viteCSSPostPlugin as p, esmExternalRequirePlugin as r, jsonPlugin as s, buildImportAnalysisPlugin as t, modulePreloadPolyfillPlugin as u, webWorkerPostPlugin as v };
|