@rolldown/browser 1.0.0-beta.9-commit.51df2b7 → 1.0.0-beta.9-commit.aca15b3
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.cjs +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/config.cjs +2 -2
- package/dist/config.mjs +2 -2
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.mjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.mjs +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{load-config-BWvVdMQC.mjs → load-config-DObkWVL8.mjs} +1 -1
- package/dist/shared/{load-config-C_mys6Zs.cjs → load-config-R-3Cxc8k.cjs} +1 -1
- package/dist/shared/{src-ib3YzbjY.mjs → src-B-ifdPZF.mjs} +14 -5
- package/dist/shared/{src-CPo8xoSH.cjs → src-DT4kKNMx.cjs} +13 -4
- package/dist/{src-OT4SxC4Y.js → src-D9MVFSIK.js} +13 -4
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DT4kKNMx.cjs');
|
|
3
3
|
const require_dist = require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-5aLNEQ2C.cjs');
|
|
5
|
-
const require_load_config = require('./shared/load-config-
|
|
5
|
+
const require_load_config = require('./shared/load-config-R-3Cxc8k.cjs');
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
7
7
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
8
8
|
const node_process = require_chunk.__toESM(require("node:process"));
|
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __commonJS, __esm, __toESM } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
2
|
+
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-B-ifdPZF.mjs";
|
|
3
3
|
import { arraify, init_misc } from "./shared/dist-CAn6dxW6.mjs";
|
|
4
4
|
import "./shared/parse-ast-index-NgEigHGy.mjs";
|
|
5
|
-
import { init_load_config, loadConfig } from "./shared/load-config-
|
|
5
|
+
import { init_load_config, loadConfig } from "./shared/load-config-DObkWVL8.mjs";
|
|
6
6
|
import path, { sep } from "node:path";
|
|
7
7
|
import colors from "ansis";
|
|
8
8
|
import process$1 from "node:process";
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-DT4kKNMx.cjs');
|
|
2
2
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
3
3
|
require('./shared/parse-ast-index-5aLNEQ2C.cjs');
|
|
4
|
-
const require_load_config = require('./shared/load-config-
|
|
4
|
+
const require_load_config = require('./shared/load-config-R-3Cxc8k.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = require_src.version;
|
package/dist/config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineConfig, init_define_config, version } from "./shared/src-
|
|
1
|
+
import { defineConfig, init_define_config, version } from "./shared/src-B-ifdPZF.mjs";
|
|
2
2
|
import "./shared/dist-CAn6dxW6.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-NgEigHGy.mjs";
|
|
4
|
-
import { init_load_config, loadConfig } from "./shared/load-config-
|
|
4
|
+
import { init_load_config, loadConfig } from "./shared/load-config-DObkWVL8.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
init_define_config();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-
|
|
1
|
+
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-D9MVFSIK.js";
|
|
2
2
|
import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DT4kKNMx.cjs');
|
|
3
3
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-5aLNEQ2C.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
1
|
+
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-B-ifdPZF.mjs";
|
|
2
2
|
import "./shared/dist-CAn6dxW6.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-NgEigHGy.mjs";
|
|
4
4
|
import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-B-ifdPZF.mjs";
|
|
2
2
|
import "./shared/dist-CAn6dxW6.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-NgEigHGy.mjs";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DT4kKNMx.cjs');
|
|
3
3
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-5aLNEQ2C.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-B-ifdPZF.mjs";
|
|
3
3
|
import "./shared/dist-CAn6dxW6.mjs";
|
|
4
4
|
import "./shared/parse-ast-index-NgEigHGy.mjs";
|
|
5
5
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esm } from "./chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { init_rolldown, rolldown } from "./src-
|
|
2
|
+
import { init_rolldown, rolldown } from "./src-B-ifdPZF.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { cwd } from "node:process";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-DT4kKNMx.cjs');
|
|
3
3
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
4
4
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
5
5
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
@@ -3,12 +3,13 @@ import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id
|
|
|
3
3
|
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-NgEigHGy.mjs";
|
|
4
4
|
import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
5
5
|
import path from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
6
7
|
import colors from "ansis";
|
|
7
8
|
import os from "node:os";
|
|
8
9
|
import { Worker } from "node:worker_threads";
|
|
9
10
|
|
|
10
11
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.9-commit.
|
|
12
|
+
var version = "1.0.0-beta.9-commit.aca15b3";
|
|
12
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
14
|
|
|
14
15
|
//#endregion
|
|
@@ -95,6 +96,9 @@ function assetPlugin(config) {
|
|
|
95
96
|
function webWorkerPostPlugin() {
|
|
96
97
|
return new BuiltinPlugin("builtin:web-worker-post");
|
|
97
98
|
}
|
|
99
|
+
function oxcRuntimePlugin(config) {
|
|
100
|
+
return new BuiltinPlugin("builtin:oxc-runtime", config);
|
|
101
|
+
}
|
|
98
102
|
var BuiltinPlugin;
|
|
99
103
|
var init_constructors = __esm({ "src/builtin-plugin/constructors.ts"() {
|
|
100
104
|
init_utils();
|
|
@@ -339,7 +343,7 @@ function normalizePlugins(plugins, anonymousPrefix) {
|
|
|
339
343
|
}
|
|
340
344
|
return plugins;
|
|
341
345
|
}
|
|
342
|
-
var normalizePluginOption, ANONYMOUS_PLUGIN_PREFIX, ANONYMOUS_OUTPUT_PLUGIN_PREFIX;
|
|
346
|
+
var normalizePluginOption, ANONYMOUS_PLUGIN_PREFIX, ANONYMOUS_OUTPUT_PLUGIN_PREFIX, BUILTIN_PLUGINS;
|
|
343
347
|
var init_normalize_plugin_option = __esm({ "src/utils/normalize-plugin-option.ts"() {
|
|
344
348
|
init_constructors();
|
|
345
349
|
init_plugin$1();
|
|
@@ -349,6 +353,7 @@ var init_normalize_plugin_option = __esm({ "src/utils/normalize-plugin-option.ts
|
|
|
349
353
|
normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);
|
|
350
354
|
ANONYMOUS_PLUGIN_PREFIX = "at position ";
|
|
351
355
|
ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
|
|
356
|
+
BUILTIN_PLUGINS = [oxcRuntimePlugin({ resolveBase: fileURLToPath(import.meta.url) })];
|
|
352
357
|
} });
|
|
353
358
|
|
|
354
359
|
//#endregion
|
|
@@ -1805,7 +1810,7 @@ function validateCliOptions(options) {
|
|
|
1805
1810
|
})];
|
|
1806
1811
|
}
|
|
1807
1812
|
function validateOption(key, options) {
|
|
1808
|
-
if (globalThis.process?.env?.
|
|
1813
|
+
if (globalThis.process?.env?.ROLLUP_TEST) return;
|
|
1809
1814
|
let parsed = safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
|
|
1810
1815
|
if (!parsed.success) {
|
|
1811
1816
|
const errors = parsed.issues.map((issue) => {
|
|
@@ -1823,7 +1828,7 @@ function validateOption(key, options) {
|
|
|
1823
1828
|
if (helper && helper.ignored) return "";
|
|
1824
1829
|
return `- For the "${stringPath}". ${issueMsg}. ${helper ? helper.msg : ""}`;
|
|
1825
1830
|
}).filter(Boolean);
|
|
1826
|
-
if (errors.length)
|
|
1831
|
+
if (errors.length) console.warn(`Warning validate ${key} options.\n` + errors.join("\n"));
|
|
1827
1832
|
}
|
|
1828
1833
|
}
|
|
1829
1834
|
function getInputCliKeys() {
|
|
@@ -5546,7 +5551,11 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
|
|
|
5546
5551
|
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
5547
5552
|
if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
5548
5553
|
const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
5549
|
-
let plugins = [
|
|
5554
|
+
let plugins = [
|
|
5555
|
+
...BUILTIN_PLUGINS,
|
|
5556
|
+
...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX),
|
|
5557
|
+
...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)
|
|
5558
|
+
];
|
|
5550
5559
|
if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
|
|
5551
5560
|
const parallelPluginInitResult = await initializeParallelPlugins(plugins);
|
|
5552
5561
|
try {
|
|
@@ -3,12 +3,13 @@ const require_dist = require('./dist-BMVjvV-v.cjs');
|
|
|
3
3
|
const require_parse_ast_index = require('./parse-ast-index-5aLNEQ2C.cjs');
|
|
4
4
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
6
|
+
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
7
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
7
8
|
const node_os = require_chunk.__toESM(require("node:os"));
|
|
8
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
9
10
|
|
|
10
11
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.9-commit.
|
|
12
|
+
var version = "1.0.0-beta.9-commit.aca15b3";
|
|
12
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
14
|
|
|
14
15
|
//#endregion
|
|
@@ -100,6 +101,9 @@ function assetPlugin(config) {
|
|
|
100
101
|
function webWorkerPostPlugin() {
|
|
101
102
|
return new BuiltinPlugin("builtin:web-worker-post");
|
|
102
103
|
}
|
|
104
|
+
function oxcRuntimePlugin(config) {
|
|
105
|
+
return new BuiltinPlugin("builtin:oxc-runtime", config);
|
|
106
|
+
}
|
|
103
107
|
|
|
104
108
|
//#endregion
|
|
105
109
|
//#region src/log/logging.ts
|
|
@@ -323,6 +327,7 @@ function normalizePlugins(plugins, anonymousPrefix) {
|
|
|
323
327
|
}
|
|
324
328
|
const ANONYMOUS_PLUGIN_PREFIX = "at position ";
|
|
325
329
|
const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
|
|
330
|
+
const BUILTIN_PLUGINS = [oxcRuntimePlugin({ resolveBase: (0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href) })];
|
|
326
331
|
|
|
327
332
|
//#endregion
|
|
328
333
|
//#region src/plugin/minimal-plugin-context.ts
|
|
@@ -2096,7 +2101,7 @@ function validateCliOptions(options) {
|
|
|
2096
2101
|
const inputHelperMsgRecord = { output: { ignored: true } };
|
|
2097
2102
|
const outputHelperMsgRecord = {};
|
|
2098
2103
|
function validateOption(key, options) {
|
|
2099
|
-
if (globalThis.process?.env?.
|
|
2104
|
+
if (globalThis.process?.env?.ROLLUP_TEST) return;
|
|
2100
2105
|
let parsed = safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
|
|
2101
2106
|
if (!parsed.success) {
|
|
2102
2107
|
const errors = parsed.issues.map((issue) => {
|
|
@@ -2114,7 +2119,7 @@ function validateOption(key, options) {
|
|
|
2114
2119
|
if (helper && helper.ignored) return "";
|
|
2115
2120
|
return `- For the "${stringPath}". ${issueMsg}. ${helper ? helper.msg : ""}`;
|
|
2116
2121
|
}).filter(Boolean);
|
|
2117
|
-
if (errors.length)
|
|
2122
|
+
if (errors.length) console.warn(`Warning validate ${key} options.\n` + errors.join("\n"));
|
|
2118
2123
|
}
|
|
2119
2124
|
}
|
|
2120
2125
|
function getInputCliKeys() {
|
|
@@ -4202,7 +4207,11 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
|
|
|
4202
4207
|
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
4203
4208
|
if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
4204
4209
|
const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4205
|
-
let plugins = [
|
|
4210
|
+
let plugins = [
|
|
4211
|
+
...BUILTIN_PLUGINS,
|
|
4212
|
+
...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX),
|
|
4213
|
+
...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)
|
|
4214
|
+
];
|
|
4206
4215
|
if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
|
|
4207
4216
|
const parallelPluginInitResult = await initializeParallelPlugins(plugins);
|
|
4208
4217
|
try {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
2
2
|
import path from "pathe";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
3
4
|
import colors from "ansis";
|
|
4
5
|
|
|
5
6
|
//#region package.json
|
|
6
|
-
var version = "1.0.0-beta.9-commit.
|
|
7
|
+
var version = "1.0.0-beta.9-commit.aca15b3";
|
|
7
8
|
|
|
8
9
|
//#endregion
|
|
9
10
|
//#region src/builtin-plugin/utils.ts
|
|
@@ -94,6 +95,9 @@ function assetPlugin(config) {
|
|
|
94
95
|
function webWorkerPostPlugin() {
|
|
95
96
|
return new BuiltinPlugin("builtin:web-worker-post");
|
|
96
97
|
}
|
|
98
|
+
function oxcRuntimePlugin(config) {
|
|
99
|
+
return new BuiltinPlugin("builtin:oxc-runtime", config);
|
|
100
|
+
}
|
|
97
101
|
|
|
98
102
|
//#endregion
|
|
99
103
|
//#region src/utils/misc.ts
|
|
@@ -518,6 +522,7 @@ function normalizePlugins(plugins, anonymousPrefix) {
|
|
|
518
522
|
}
|
|
519
523
|
const ANONYMOUS_PLUGIN_PREFIX = "at position ";
|
|
520
524
|
const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
|
|
525
|
+
const BUILTIN_PLUGINS = [oxcRuntimePlugin({ resolveBase: fileURLToPath(import.meta.url) })];
|
|
521
526
|
|
|
522
527
|
//#endregion
|
|
523
528
|
//#region src/plugin/minimal-plugin-context.ts
|
|
@@ -1895,7 +1900,7 @@ const CliOptionsSchema = strictObject({
|
|
|
1895
1900
|
const inputHelperMsgRecord = { output: { ignored: true } };
|
|
1896
1901
|
const outputHelperMsgRecord = {};
|
|
1897
1902
|
function validateOption(key, options) {
|
|
1898
|
-
if (globalThis.process?.env?.
|
|
1903
|
+
if (globalThis.process?.env?.ROLLUP_TEST) return;
|
|
1899
1904
|
let parsed = safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
|
|
1900
1905
|
if (!parsed.success) {
|
|
1901
1906
|
const errors = parsed.issues.map((issue) => {
|
|
@@ -1913,7 +1918,7 @@ function validateOption(key, options) {
|
|
|
1913
1918
|
if (helper && helper.ignored) return "";
|
|
1914
1919
|
return `- For the "${stringPath}". ${issueMsg}. ${helper ? helper.msg : ""}`;
|
|
1915
1920
|
}).filter(Boolean);
|
|
1916
|
-
if (errors.length)
|
|
1921
|
+
if (errors.length) console.warn(`Warning validate ${key} options.\n` + errors.join("\n"));
|
|
1917
1922
|
}
|
|
1918
1923
|
}
|
|
1919
1924
|
|
|
@@ -4085,7 +4090,11 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
|
|
|
4085
4090
|
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
4086
4091
|
if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
4087
4092
|
const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4088
|
-
let plugins = [
|
|
4093
|
+
let plugins = [
|
|
4094
|
+
...BUILTIN_PLUGINS,
|
|
4095
|
+
...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX),
|
|
4096
|
+
...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)
|
|
4097
|
+
];
|
|
4089
4098
|
if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
|
|
4090
4099
|
const parallelPluginInitResult = void 0;
|
|
4091
4100
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolldown/browser",
|
|
3
|
-
"version": "1.0.0-beta.9-commit.
|
|
3
|
+
"version": "1.0.0-beta.9-commit.aca15b3",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"type": "module",
|