@rsbuild/core 0.1.8 → 0.2.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/compiled/commander/package.json +1 -1
- package/compiled/connect-history-api-fallback/package.json +1 -1
- package/compiled/dotenv/package.json +1 -1
- package/compiled/dotenv-expand/package.json +1 -1
- package/compiled/http-compression/package.json +1 -1
- package/compiled/open/package.json +1 -1
- package/compiled/sirv/package.json +1 -1
- package/compiled/ws/package.json +1 -1
- package/dist/cli/commands.js +6 -3
- package/dist/cli/config.d.ts +7 -1
- package/dist/cli/config.js +7 -4
- package/dist/cli/prepare.js +1 -1
- package/dist/createRsbuild.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/dist/loadEnv.d.ts +2 -2
- package/dist/loadEnv.js +2 -2
- package/dist/plugins/asset.js +2 -2
- package/dist/plugins/basic.d.ts +5 -0
- package/dist/plugins/basic.js +68 -0
- package/dist/plugins/fileSize.js +1 -1
- package/dist/plugins/html.d.ts +1 -2
- package/dist/plugins/html.js +8 -8
- package/dist/plugins/index.js +2 -3
- package/dist/plugins/inlineChunk.js +25 -28
- package/dist/plugins/networkPerformance.js +3 -11
- package/dist/plugins/nodeAddons.js +1 -1
- package/dist/plugins/preloadOrPrefetch.js +4 -10
- package/dist/plugins/wasm.js +1 -1
- package/dist/provider/core/createCompiler.js +17 -9
- package/dist/provider/core/createContext.d.ts +3 -3
- package/dist/provider/core/createContext.js +13 -27
- package/dist/provider/core/initConfigs.d.ts +2 -2
- package/dist/provider/core/initConfigs.js +4 -3
- package/dist/provider/core/initPlugins.js +15 -12
- package/dist/provider/core/inspectConfig.d.ts +2 -20
- package/dist/provider/core/inspectConfig.js +6 -6
- package/dist/provider/css-modules-typescript-pre-loader/index.js +1 -1
- package/dist/provider/css-modules-typescript-pre-loader/{postcss-icss-extract-plugin.js → postcssIcssExtractPlugin.js} +5 -5
- package/dist/provider/index.d.ts +1 -2
- package/dist/provider/index.js +4 -7
- package/dist/provider/plugins/css.js +5 -10
- package/dist/provider/plugins/less.js +2 -2
- package/dist/provider/plugins/minimize.d.ts +1 -4
- package/dist/provider/plugins/minimize.js +18 -15
- package/dist/provider/plugins/output.js +2 -2
- package/dist/provider/plugins/resolve.js +0 -5
- package/dist/provider/plugins/rspackProfile.js +7 -4
- package/dist/provider/plugins/sass.js +2 -2
- package/dist/provider/plugins/server.d.ts +2 -0
- package/dist/provider/plugins/server.js +70 -0
- package/dist/provider/plugins/swc.js +1 -8
- package/dist/provider/provider.js +15 -1
- package/dist/provider/shared.d.ts +2 -3
- package/dist/provider/shared.js +4 -18
- package/dist/rspack/HtmlAppIconPlugin.d.ts +0 -3
- package/dist/rspack/HtmlAppIconPlugin.js +2 -2
- package/dist/rspack/HtmlBasicPlugin.d.ts +0 -3
- package/dist/rspack/HtmlBasicPlugin.js +24 -10
- package/dist/rspack/HtmlCrossOriginPlugin.d.ts +0 -3
- package/dist/rspack/HtmlCrossOriginPlugin.js +12 -2
- package/dist/rspack/HtmlNetworkPerformancePlugin.d.ts +1 -3
- package/dist/rspack/HtmlNetworkPerformancePlugin.js +13 -3
- package/dist/rspack/HtmlNoncePlugin.d.ts +0 -3
- package/dist/rspack/HtmlNoncePlugin.js +12 -2
- package/dist/rspack/HtmlTagsPlugin.d.ts +1 -7
- package/dist/rspack/HtmlTagsPlugin.js +12 -1
- package/dist/rspack/InlineChunkHtmlPlugin.d.ts +2 -3
- package/dist/rspack/InlineChunkHtmlPlugin.js +17 -3
- package/dist/rspack/RemoveCssSourcemapPlugin.d.ts +1 -3
- package/dist/rspack/RemoveCssSourcemapPlugin.js +1 -2
- package/dist/rspack/{HtmlPreloadOrPrefetchPlugin/index.d.ts → preload/HtmlPreloadOrPrefetchPlugin.d.ts} +3 -4
- package/dist/rspack/{HtmlPreloadOrPrefetchPlugin/index.js → preload/HtmlPreloadOrPrefetchPlugin.js} +17 -7
- package/dist/server/{dev-middleware → compiler-dev-middleware}/index.d.ts +2 -2
- package/dist/server/{dev-middleware → compiler-dev-middleware}/index.js +3 -3
- package/dist/server/{dev-middleware → compiler-dev-middleware}/socketServer.d.ts +2 -2
- package/dist/server/devMiddlewares.d.ts +7 -0
- package/dist/server/devMiddlewares.js +156 -0
- package/dist/server/devServer.d.ts +10 -23
- package/dist/server/devServer.js +77 -162
- package/dist/server/httpServer.d.ts +8 -0
- package/dist/server/httpServer.js +48 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/prodServer.d.ts +0 -5
- package/dist/server/prodServer.js +13 -27
- package/package.json +5 -4
- package/compiled/jiti/index.js +0 -1885
- package/compiled/jiti/license +0 -21
- package/compiled/jiti/package.json +0 -1
- package/compiled/jiti/types/jiti.d.ts +0 -19
- package/compiled/jiti/types/types.d.ts +0 -31
- package/dist/plugins/devtool.d.ts +0 -2
- package/dist/plugins/devtool.js +0 -46
- package/dist/plugins/server.d.ts +0 -2
- package/dist/plugins/server.js +0 -56
- package/dist/provider/plugins/basic.d.ts +0 -5
- package/dist/provider/plugins/basic.js +0 -34
- /package/dist/provider/css-modules-typescript-pre-loader/{postcss-icss-extract-plugin.d.ts → postcssIcssExtractPlugin.d.ts} +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/determineAsValue.d.ts +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/determineAsValue.js +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/doesChunkBelongToHtml.d.ts +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/doesChunkBelongToHtml.js +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/extractChunks.d.ts +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/extractChunks.js +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/index.d.ts +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/index.js +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/type.d.ts +0 -0
- /package/dist/rspack/{HtmlPreloadOrPrefetchPlugin → preload}/helpers/type.js +0 -0
- /package/dist/server/{dev-middleware → compiler-dev-middleware}/socketServer.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"commander","author":"TJ Holowaychuk <tj@vision-media.ca>","version":"10.0.1","license":"MIT","types":"typings/index.d.ts"}
|
|
1
|
+
{"name":"commander","author":"TJ Holowaychuk <tj@vision-media.ca>","version":"10.0.1","license":"MIT","types":"typings/index.d.ts","type":"commonjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"connect-history-api-fallback","author":{"name":"Ben Ripkens","email":"bripkens@gmail.com"},"version":"2.0.0","license":"MIT","types":"index.d.ts"}
|
|
1
|
+
{"name":"connect-history-api-fallback","author":{"name":"Ben Ripkens","email":"bripkens@gmail.com"},"version":"2.0.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"dotenv","version":"16.3.1","funding":"https://github.com/motdotla/dotenv?sponsor=1","license":"BSD-2-Clause","types":"lib/main.d.ts"}
|
|
1
|
+
{"name":"dotenv","version":"16.3.1","funding":"https://github.com/motdotla/dotenv?sponsor=1","license":"BSD-2-Clause","types":"lib/main.d.ts","type":"commonjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"dotenv-expand","author":"motdotla","version":"10.0.0","license":"BSD-2-Clause","types":"lib/main.d.ts"}
|
|
1
|
+
{"name":"dotenv-expand","author":"motdotla","version":"10.0.0","license":"BSD-2-Clause","types":"lib/main.d.ts","type":"commonjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"http-compression","author":{"email":"josefrancisco.verdu@gmail.com","name":"Kiko Beats","url":"https://kikobeats.com"},"version":"1.0.6","license":"MIT","types":"index.d.ts"}
|
|
1
|
+
{"name":"http-compression","author":{"email":"josefrancisco.verdu@gmail.com","name":"Kiko Beats","url":"https://kikobeats.com"},"version":"1.0.6","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"open","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"version":"8.4.0","funding":"https://github.com/sponsors/sindresorhus","license":"MIT"}
|
|
1
|
+
{"name":"open","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"version":"8.4.0","funding":"https://github.com/sponsors/sindresorhus","license":"MIT","type":"commonjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"sirv","author":{"name":"Luke Edwards","email":"luke@lukeed.com","url":"https://lukeed.com"},"version":"2.0.3","license":"MIT","types":"sirv.d.ts"}
|
|
1
|
+
{"name":"sirv","author":{"name":"Luke Edwards","email":"luke@lukeed.com","url":"https://lukeed.com"},"version":"2.0.3","license":"MIT","types":"sirv.d.ts","type":"commonjs"}
|
package/compiled/ws/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.14.2","license":"MIT"}
|
|
1
|
+
{"name":"ws","author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","version":"8.14.2","license":"MIT","type":"commonjs"}
|
package/dist/cli/commands.js
CHANGED
|
@@ -47,8 +47,11 @@ async function init({
|
|
|
47
47
|
}
|
|
48
48
|
try {
|
|
49
49
|
const root = process.cwd();
|
|
50
|
-
const { publicVars } = await (0, import_loadEnv.loadEnv)({
|
|
51
|
-
const config = await (0, import_config.loadConfig)(
|
|
50
|
+
const { publicVars } = await (0, import_loadEnv.loadEnv)({ cwd: root });
|
|
51
|
+
const config = await (0, import_config.loadConfig)({
|
|
52
|
+
cwd: root,
|
|
53
|
+
path: commonOpts.config
|
|
54
|
+
});
|
|
52
55
|
const { createRsbuild } = await Promise.resolve().then(() => __toESM(require("../createRsbuild")));
|
|
53
56
|
config.source || (config.source = {});
|
|
54
57
|
config.source.define = {
|
|
@@ -81,7 +84,7 @@ async function init({
|
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
function runCli() {
|
|
84
|
-
import_commander.program.name("rsbuild").usage("<command> [options]").version("0.
|
|
87
|
+
import_commander.program.name("rsbuild").usage("<command> [options]").version("0.2.0");
|
|
85
88
|
import_commander.program.command("dev").option("--open", "open the page in browser on startup").option(
|
|
86
89
|
"--port <port>",
|
|
87
90
|
"specify a port number for Rsbuild Server to listen"
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -17,4 +17,10 @@ export type RsbuildConfigExport = RsbuildConfig | RsbuildConfigFn;
|
|
|
17
17
|
*/
|
|
18
18
|
export declare function defineConfig(config: RsbuildConfig): RsbuildConfig;
|
|
19
19
|
export declare function defineConfig(config: RsbuildConfigFn): RsbuildConfigFn;
|
|
20
|
-
export declare function loadConfig(
|
|
20
|
+
export declare function loadConfig({
|
|
21
|
+
cwd,
|
|
22
|
+
path
|
|
23
|
+
}: {
|
|
24
|
+
cwd: string;
|
|
25
|
+
path?: string;
|
|
26
|
+
}): Promise<RsbuildConfig>;
|
package/dist/cli/config.js
CHANGED
|
@@ -86,13 +86,16 @@ async function watchConfig(root, configFile) {
|
|
|
86
86
|
watcher.on("change", callback);
|
|
87
87
|
watcher.on("unlink", callback);
|
|
88
88
|
}
|
|
89
|
-
async function loadConfig(
|
|
90
|
-
|
|
89
|
+
async function loadConfig({
|
|
90
|
+
cwd,
|
|
91
|
+
path
|
|
92
|
+
}) {
|
|
93
|
+
const configFile = resolveConfigPath(cwd, path);
|
|
91
94
|
if (!configFile) {
|
|
92
95
|
return {};
|
|
93
96
|
}
|
|
94
97
|
try {
|
|
95
|
-
const { default: jiti } = await Promise.resolve().then(() => __toESM(require("
|
|
98
|
+
const { default: jiti } = await Promise.resolve().then(() => __toESM(require("@rsbuild/shared/jiti")));
|
|
96
99
|
const loadConfig2 = jiti(__filename, {
|
|
97
100
|
esmResolve: true,
|
|
98
101
|
// disable require cache to support restart CLI and read the new config
|
|
@@ -101,7 +104,7 @@ async function loadConfig(root, customConfig) {
|
|
|
101
104
|
});
|
|
102
105
|
const command = process.argv[2];
|
|
103
106
|
if (command === "dev") {
|
|
104
|
-
watchConfig(
|
|
107
|
+
watchConfig(cwd, configFile);
|
|
105
108
|
}
|
|
106
109
|
const configExport = loadConfig2(configFile);
|
|
107
110
|
if (typeof configExport === "function") {
|
package/dist/cli/prepare.js
CHANGED
|
@@ -34,7 +34,7 @@ function prepareCli() {
|
|
|
34
34
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js")) {
|
|
35
35
|
console.log();
|
|
36
36
|
}
|
|
37
|
-
import_rslog.logger.greet(` ${`Rsbuild v${"0.
|
|
37
|
+
import_rslog.logger.greet(` ${`Rsbuild v${"0.2.0"}`}
|
|
38
38
|
`);
|
|
39
39
|
}
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/createRsbuild.js
CHANGED
|
@@ -44,7 +44,6 @@ async function createRsbuild(options) {
|
|
|
44
44
|
const provider = options.provider ? options.provider({ rsbuildConfig }) : await getRspackProvider(rsbuildConfig);
|
|
45
45
|
const rsbuildOptions = {
|
|
46
46
|
cwd: process.cwd(),
|
|
47
|
-
target: ["web"],
|
|
48
47
|
...options
|
|
49
48
|
};
|
|
50
49
|
const pluginStore = (0, import_shared.createPluginStore)();
|
|
@@ -56,6 +55,7 @@ async function createRsbuild(options) {
|
|
|
56
55
|
initConfigs,
|
|
57
56
|
inspectConfig,
|
|
58
57
|
createCompiler,
|
|
58
|
+
createDevServer,
|
|
59
59
|
startDevServer,
|
|
60
60
|
applyDefaultPlugins
|
|
61
61
|
} = await provider({
|
|
@@ -88,6 +88,7 @@ async function createRsbuild(options) {
|
|
|
88
88
|
createCompiler,
|
|
89
89
|
initConfigs,
|
|
90
90
|
inspectConfig,
|
|
91
|
+
createDevServer,
|
|
91
92
|
startDevServer,
|
|
92
93
|
context: publicContext
|
|
93
94
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* the public API of @rsbuild/core.
|
|
4
4
|
*/
|
|
5
5
|
export { createRsbuild } from './createRsbuild';
|
|
6
|
-
export { defineConfig } from './cli/config';
|
|
6
|
+
export { loadConfig, defineConfig } from './cli/config';
|
|
7
7
|
export { logger, mergeRsbuildConfig } from '@rsbuild/shared';
|
|
8
8
|
export type { Rspack } from './provider';
|
|
9
9
|
export type { RsbuildConfig, NormalizedConfig, RsbuildPlugin, RsbuildPluginAPI } from './types';
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var src_exports = {};
|
|
|
20
20
|
__export(src_exports, {
|
|
21
21
|
createRsbuild: () => import_createRsbuild.createRsbuild,
|
|
22
22
|
defineConfig: () => import_config.defineConfig,
|
|
23
|
+
loadConfig: () => import_config.loadConfig,
|
|
23
24
|
logger: () => import_shared.logger,
|
|
24
25
|
mergeRsbuildConfig: () => import_shared.mergeRsbuildConfig
|
|
25
26
|
});
|
|
@@ -31,6 +32,7 @@ var import_shared = require("@rsbuild/shared");
|
|
|
31
32
|
0 && (module.exports = {
|
|
32
33
|
createRsbuild,
|
|
33
34
|
defineConfig,
|
|
35
|
+
loadConfig,
|
|
34
36
|
logger,
|
|
35
37
|
mergeRsbuildConfig
|
|
36
38
|
});
|
package/dist/loadEnv.d.ts
CHANGED
package/dist/loadEnv.js
CHANGED
|
@@ -40,12 +40,12 @@ const getEnvFiles = () => {
|
|
|
40
40
|
return [".env", ".env.local", `.env.${NODE_ENV}`, `.env.${NODE_ENV}.local`];
|
|
41
41
|
};
|
|
42
42
|
async function loadEnv({
|
|
43
|
-
|
|
43
|
+
cwd = process.cwd(),
|
|
44
44
|
prefixes = ["PUBLIC_"]
|
|
45
45
|
} = {}) {
|
|
46
46
|
const { parse } = await Promise.resolve().then(() => __toESM(require("../compiled/dotenv")));
|
|
47
47
|
const { expand } = await Promise.resolve().then(() => __toESM(require("../compiled/dotenv-expand")));
|
|
48
|
-
const envPaths = getEnvFiles().map((filename) => (0, import_path.join)(
|
|
48
|
+
const envPaths = getEnvFiles().map((filename) => (0, import_path.join)(cwd, filename)).filter(import_shared.isFileSync);
|
|
49
49
|
const parsed = {};
|
|
50
50
|
envPaths.forEach((envPath) => {
|
|
51
51
|
Object.assign(parsed, parse(import_fs.default.readFileSync(envPath)));
|
package/dist/plugins/asset.js
CHANGED
|
@@ -48,8 +48,8 @@ const pluginAsset = () => ({
|
|
|
48
48
|
const config = api.getNormalizedConfig();
|
|
49
49
|
const createAssetRule = (assetType, exts) => {
|
|
50
50
|
const regExp = getRegExpForExts(exts);
|
|
51
|
-
const distDir = (0, import_shared.getDistPath)(config
|
|
52
|
-
const filename = (0, import_shared.getFilename)(config
|
|
51
|
+
const distDir = (0, import_shared.getDistPath)(config, assetType);
|
|
52
|
+
const filename = (0, import_shared.getFilename)(config, assetType, isProd);
|
|
53
53
|
const maxSize = config.output.dataUriLimit[assetType];
|
|
54
54
|
const rule = chain.module.rule(assetType).test(regExp);
|
|
55
55
|
(0, import_shared.chainStaticAssetRule)({
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var basic_exports = {};
|
|
30
|
+
__export(basic_exports, {
|
|
31
|
+
pluginBasic: () => pluginBasic
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(basic_exports);
|
|
34
|
+
var import_path = __toESM(require("path"));
|
|
35
|
+
var import_shared = require("@rsbuild/shared");
|
|
36
|
+
const pluginBasic = () => ({
|
|
37
|
+
name: "rsbuild:basic",
|
|
38
|
+
setup(api) {
|
|
39
|
+
api.modifyBundlerChain((chain, { env, isProd, target }) => {
|
|
40
|
+
const config = api.getNormalizedConfig();
|
|
41
|
+
chain.name(import_shared.TARGET_ID_MAP[target]);
|
|
42
|
+
chain.devtool((0, import_shared.getJsSourceMap)(config));
|
|
43
|
+
chain.context(api.context.rootPath);
|
|
44
|
+
chain.mode(isProd ? "production" : "development");
|
|
45
|
+
chain.merge({
|
|
46
|
+
infrastructureLogging: {
|
|
47
|
+
// Using `error` level to avoid `cache.PackFileCacheStrategy` logs
|
|
48
|
+
level: "error"
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
chain.performance.hints(false);
|
|
52
|
+
chain.module.parser.merge({
|
|
53
|
+
javascript: {
|
|
54
|
+
exportsPresence: "error"
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
if (env === "development") {
|
|
58
|
+
chain.output.devtoolModuleFilenameTemplate(
|
|
59
|
+
(info) => import_path.default.resolve(info.absoluteResourcePath).replace(/\\/g, "/")
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
pluginBasic
|
|
68
|
+
});
|
package/dist/plugins/fileSize.js
CHANGED
|
@@ -100,7 +100,7 @@ async function printFileSizes(config, stats, distPath) {
|
|
|
100
100
|
if (assets.length === 0) {
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
assets.sort((a, b) =>
|
|
103
|
+
assets.sort((a, b) => a.size - b.size);
|
|
104
104
|
import_shared2.logger.info(`Production file sizes:
|
|
105
105
|
`);
|
|
106
106
|
const longestLabelLength = Math.max(...assets.map((a) => a.sizeLabel.length));
|
package/dist/plugins/html.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HtmlConfig, RsbuildPluginAPI, NormalizedConfig
|
|
1
|
+
import type { HtmlConfig, RsbuildPluginAPI, NormalizedConfig } from '@rsbuild/shared';
|
|
2
2
|
import type { RsbuildPlugin } from '../types';
|
|
3
3
|
export declare function getTitle(entryName: string, config: NormalizedConfig): string;
|
|
4
4
|
export declare function getInject(entryName: string, config: NormalizedConfig): import("@rsbuild/shared").ScriptInject;
|
|
@@ -11,7 +11,6 @@ export declare function getFavicon(entryName: string, config: {
|
|
|
11
11
|
}): string;
|
|
12
12
|
export declare function getMetaTags(entryName: string, config: {
|
|
13
13
|
html: HtmlConfig;
|
|
14
|
-
output: NormalizedOutputConfig;
|
|
15
14
|
}, templateContent?: string): import("@rsbuild/shared").MetaOptions;
|
|
16
15
|
export declare const applyInjectTags: (api: RsbuildPluginAPI) => void;
|
|
17
16
|
export declare const pluginHtml: () => RsbuildPlugin;
|
package/dist/plugins/html.js
CHANGED
|
@@ -142,7 +142,7 @@ function getChunks(entryName, entryValue) {
|
|
|
142
142
|
return [...dependOn, entryName];
|
|
143
143
|
}
|
|
144
144
|
const applyInjectTags = (api) => {
|
|
145
|
-
api.modifyBundlerChain(async (chain, {
|
|
145
|
+
api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
|
|
146
146
|
const config = api.getNormalizedConfig();
|
|
147
147
|
const tags = (0, import_shared.castArray)(config.html.tags).filter(Boolean);
|
|
148
148
|
const tagsByEntries = config.html.tagsByEntries || {};
|
|
@@ -157,7 +157,6 @@ const applyInjectTags = (api) => {
|
|
|
157
157
|
}
|
|
158
158
|
const { HtmlTagsPlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/HtmlTagsPlugin")));
|
|
159
159
|
const sharedOptions = {
|
|
160
|
-
HtmlPlugin,
|
|
161
160
|
append: true,
|
|
162
161
|
hash: false,
|
|
163
162
|
publicPath: true,
|
|
@@ -215,11 +214,12 @@ const pluginHtml = () => ({
|
|
|
215
214
|
minify,
|
|
216
215
|
filename,
|
|
217
216
|
template: templatePath,
|
|
217
|
+
entryName,
|
|
218
218
|
templateParameters,
|
|
219
219
|
scriptLoading: config.html.scriptLoading
|
|
220
220
|
};
|
|
221
221
|
const htmlInfo = {};
|
|
222
|
-
htmlInfoMap[
|
|
222
|
+
htmlInfoMap[entryName] = htmlInfo;
|
|
223
223
|
if (templateContent) {
|
|
224
224
|
htmlInfo.templateContent = templateContent;
|
|
225
225
|
}
|
|
@@ -247,12 +247,12 @@ const pluginHtml = () => ({
|
|
|
247
247
|
})
|
|
248
248
|
);
|
|
249
249
|
const { HtmlBasicPlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/HtmlBasicPlugin")));
|
|
250
|
-
chain.plugin(CHAIN_ID.PLUGIN.HTML_BASIC).use(HtmlBasicPlugin, [{
|
|
250
|
+
chain.plugin(CHAIN_ID.PLUGIN.HTML_BASIC).use(HtmlBasicPlugin, [{ info: htmlInfoMap }]);
|
|
251
251
|
if (config.security) {
|
|
252
252
|
const { nonce } = config.security;
|
|
253
253
|
if (nonce) {
|
|
254
254
|
const { HtmlNoncePlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/HtmlNoncePlugin")));
|
|
255
|
-
chain.plugin(CHAIN_ID.PLUGIN.HTML_NONCE).use(HtmlNoncePlugin, [{ nonce
|
|
255
|
+
chain.plugin(CHAIN_ID.PLUGIN.HTML_NONCE).use(HtmlNoncePlugin, [{ nonce }]);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
if (config.html) {
|
|
@@ -261,15 +261,15 @@ const pluginHtml = () => ({
|
|
|
261
261
|
const { HtmlCrossOriginPlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/HtmlCrossOriginPlugin")));
|
|
262
262
|
const formattedCrossorigin = crossorigin === true ? "anonymous" : crossorigin;
|
|
263
263
|
chain.plugin(CHAIN_ID.PLUGIN.HTML_CROSS_ORIGIN).use(HtmlCrossOriginPlugin, [
|
|
264
|
-
{ crossOrigin: formattedCrossorigin
|
|
264
|
+
{ crossOrigin: formattedCrossorigin }
|
|
265
265
|
]);
|
|
266
266
|
chain.output.crossOriginLoading(formattedCrossorigin);
|
|
267
267
|
}
|
|
268
268
|
if (appIcon) {
|
|
269
269
|
const { HtmlAppIconPlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/HtmlAppIconPlugin")));
|
|
270
|
-
const distDir = (0, import_shared.getDistPath)(config
|
|
270
|
+
const distDir = (0, import_shared.getDistPath)(config, "image");
|
|
271
271
|
const iconPath = import_path.default.isAbsolute(appIcon) ? appIcon : import_path.default.join(api.context.rootPath, appIcon);
|
|
272
|
-
chain.plugin(CHAIN_ID.PLUGIN.APP_ICON).use(HtmlAppIconPlugin, [{ iconPath, distDir
|
|
272
|
+
chain.plugin(CHAIN_ID.PLUGIN.APP_ICON).use(HtmlAppIconPlugin, [{ iconPath, distDir }]);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
}
|
package/dist/plugins/index.js
CHANGED
|
@@ -32,11 +32,11 @@ __export(plugins_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(plugins_exports);
|
|
34
34
|
const plugins = {
|
|
35
|
+
basic: () => Promise.resolve().then(() => __toESM(require("./basic"))).then((m) => m.pluginBasic()),
|
|
35
36
|
html: () => Promise.resolve().then(() => __toESM(require("./html"))).then((m) => m.pluginHtml()),
|
|
36
37
|
cleanOutput: () => Promise.resolve().then(() => __toESM(require("./cleanOutput"))).then((m) => m.pluginCleanOutput()),
|
|
37
38
|
startUrl: () => Promise.resolve().then(() => __toESM(require("./startUrl"))).then((m) => m.pluginStartUrl()),
|
|
38
39
|
fileSize: () => Promise.resolve().then(() => __toESM(require("./fileSize"))).then((m) => m.pluginFileSize()),
|
|
39
|
-
devtool: () => Promise.resolve().then(() => __toESM(require("./devtool"))).then((m) => m.pluginDevtool()),
|
|
40
40
|
target: () => Promise.resolve().then(() => __toESM(require("./target"))).then((m) => m.pluginTarget()),
|
|
41
41
|
entry: () => Promise.resolve().then(() => __toESM(require("./entry"))).then((m) => m.pluginEntry()),
|
|
42
42
|
cache: () => Promise.resolve().then(() => __toESM(require("./cache"))).then((m) => m.pluginCache()),
|
|
@@ -53,8 +53,7 @@ const plugins = {
|
|
|
53
53
|
networkPerformance: () => Promise.resolve().then(() => __toESM(require("./networkPerformance"))).then((m) => m.pluginNetworkPerformance()),
|
|
54
54
|
preloadOrPrefetch: () => Promise.resolve().then(() => __toESM(require("./preloadOrPrefetch"))).then((m) => m.pluginPreloadOrPrefetch()),
|
|
55
55
|
performance: () => Promise.resolve().then(() => __toESM(require("./performance"))).then((m) => m.pluginPerformance()),
|
|
56
|
-
define: () => Promise.resolve().then(() => __toESM(require("./define"))).then((m) => m.pluginDefine())
|
|
57
|
-
server: () => Promise.resolve().then(() => __toESM(require("./server"))).then((m) => m.pluginServer())
|
|
56
|
+
define: () => Promise.resolve().then(() => __toESM(require("./define"))).then((m) => m.pluginDefine())
|
|
58
57
|
};
|
|
59
58
|
// Annotate the CommonJS export names for ESM import in node:
|
|
60
59
|
0 && (module.exports = {
|
|
@@ -35,35 +35,32 @@ var import_shared = require("@rsbuild/shared");
|
|
|
35
35
|
const pluginInlineChunk = () => ({
|
|
36
36
|
name: "rsbuild:inline-chunk",
|
|
37
37
|
setup(api) {
|
|
38
|
-
api.modifyBundlerChain(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const { InlineChunkHtmlPlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/InlineChunkHtmlPlugin")));
|
|
45
|
-
const { inlineStyles, inlineScripts } = config.output;
|
|
46
|
-
const scriptTests = [];
|
|
47
|
-
const styleTests = [];
|
|
48
|
-
if (inlineScripts) {
|
|
49
|
-
scriptTests.push(inlineScripts === true ? import_shared.JS_REGEX : inlineScripts);
|
|
50
|
-
}
|
|
51
|
-
if (inlineStyles) {
|
|
52
|
-
styleTests.push(inlineStyles === true ? import_shared.CSS_REGEX : inlineStyles);
|
|
53
|
-
}
|
|
54
|
-
if (!scriptTests.length && !styleTests.length) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
chain.plugin(CHAIN_ID.PLUGIN.INLINE_HTML).use(InlineChunkHtmlPlugin, [
|
|
58
|
-
HtmlPlugin,
|
|
59
|
-
{
|
|
60
|
-
styleTests,
|
|
61
|
-
scriptTests,
|
|
62
|
-
distPath: (0, import_shared.pick)(config.output.distPath, ["js", "css"])
|
|
63
|
-
}
|
|
64
|
-
]);
|
|
38
|
+
api.modifyBundlerChain(async (chain, { target, CHAIN_ID, isProd }) => {
|
|
39
|
+
const config = api.getNormalizedConfig();
|
|
40
|
+
if ((0, import_shared.isHtmlDisabled)(config, target) || !isProd) {
|
|
41
|
+
return;
|
|
65
42
|
}
|
|
66
|
-
|
|
43
|
+
const { InlineChunkHtmlPlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/InlineChunkHtmlPlugin")));
|
|
44
|
+
const { inlineStyles, inlineScripts } = config.output;
|
|
45
|
+
const scriptTests = [];
|
|
46
|
+
const styleTests = [];
|
|
47
|
+
if (inlineScripts) {
|
|
48
|
+
scriptTests.push(inlineScripts === true ? import_shared.JS_REGEX : inlineScripts);
|
|
49
|
+
}
|
|
50
|
+
if (inlineStyles) {
|
|
51
|
+
styleTests.push(inlineStyles === true ? import_shared.CSS_REGEX : inlineStyles);
|
|
52
|
+
}
|
|
53
|
+
if (!scriptTests.length && !styleTests.length) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
chain.plugin(CHAIN_ID.PLUGIN.INLINE_HTML).use(InlineChunkHtmlPlugin, [
|
|
57
|
+
{
|
|
58
|
+
styleTests,
|
|
59
|
+
scriptTests,
|
|
60
|
+
distPath: (0, import_shared.pick)(config.output.distPath, ["js", "css"])
|
|
61
|
+
}
|
|
62
|
+
]);
|
|
63
|
+
});
|
|
67
64
|
}
|
|
68
65
|
});
|
|
69
66
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -35,7 +35,7 @@ const pluginNetworkPerformance = () => ({
|
|
|
35
35
|
name: `plugin-network-performance`,
|
|
36
36
|
setup(api) {
|
|
37
37
|
api.modifyBundlerChain(
|
|
38
|
-
async (chain, { CHAIN_ID, isServer, isWebWorker, isServiceWorker
|
|
38
|
+
async (chain, { CHAIN_ID, isServer, isWebWorker, isServiceWorker }) => {
|
|
39
39
|
const config = api.getNormalizedConfig();
|
|
40
40
|
const {
|
|
41
41
|
performance: { dnsPrefetch, preconnect }
|
|
@@ -45,18 +45,10 @@ const pluginNetworkPerformance = () => ({
|
|
|
45
45
|
}
|
|
46
46
|
const { HtmlNetworkPerformancePlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/HtmlNetworkPerformancePlugin")));
|
|
47
47
|
if (dnsPrefetch) {
|
|
48
|
-
chain.plugin(CHAIN_ID.PLUGIN.HTML_DNS_PREFETCH).use(HtmlNetworkPerformancePlugin, [
|
|
49
|
-
dnsPrefetch,
|
|
50
|
-
"dnsPrefetch",
|
|
51
|
-
HtmlPlugin
|
|
52
|
-
]);
|
|
48
|
+
chain.plugin(CHAIN_ID.PLUGIN.HTML_DNS_PREFETCH).use(HtmlNetworkPerformancePlugin, [dnsPrefetch, "dnsPrefetch"]);
|
|
53
49
|
}
|
|
54
50
|
if (preconnect) {
|
|
55
|
-
chain.plugin(CHAIN_ID.PLUGIN.HTML_PRECONNECT).use(HtmlNetworkPerformancePlugin, [
|
|
56
|
-
preconnect,
|
|
57
|
-
"preconnect",
|
|
58
|
-
HtmlPlugin
|
|
59
|
-
]);
|
|
51
|
+
chain.plugin(CHAIN_ID.PLUGIN.HTML_PRECONNECT).use(HtmlNetworkPerformancePlugin, [preconnect, "preconnect"]);
|
|
60
52
|
}
|
|
61
53
|
}
|
|
62
54
|
);
|
|
@@ -54,7 +54,7 @@ const pluginNodeAddons = () => ({
|
|
|
54
54
|
};
|
|
55
55
|
const { name: pkgName } = require(pkgJSON);
|
|
56
56
|
const config = api.getNormalizedConfig();
|
|
57
|
-
const serverPath = (0, import_shared.getDistPath)(config
|
|
57
|
+
const serverPath = (0, import_shared.getDistPath)(config, "server");
|
|
58
58
|
return `${serverPath}/${getFilename(resourcePath, pkgName)}`;
|
|
59
59
|
};
|
|
60
60
|
chain.module.rule(CHAIN_ID.RULE.NODE).test(/\.node$/).use(CHAIN_ID.USE.NODE).loader((0, import_shared.getSharedPkgCompiledPath)("node-loader")).options({
|
|
@@ -35,7 +35,7 @@ const pluginPreloadOrPrefetch = () => ({
|
|
|
35
35
|
name: `plugin-preload-or-prefetch`,
|
|
36
36
|
setup(api) {
|
|
37
37
|
api.modifyBundlerChain(
|
|
38
|
-
async (chain, { CHAIN_ID, isServer, isWebWorker, isServiceWorker
|
|
38
|
+
async (chain, { CHAIN_ID, isServer, isWebWorker, isServiceWorker }) => {
|
|
39
39
|
const config = api.getNormalizedConfig();
|
|
40
40
|
const {
|
|
41
41
|
performance: { preload, prefetch }
|
|
@@ -44,22 +44,16 @@ const pluginPreloadOrPrefetch = () => ({
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
const HTMLCount = chain.entryPoints.values().length;
|
|
47
|
-
const {
|
|
47
|
+
const { HtmlPreloadOrPrefetchPlugin } = await Promise.resolve().then(() => __toESM(require("../rspack/preload/HtmlPreloadOrPrefetchPlugin")));
|
|
48
48
|
if (prefetch) {
|
|
49
|
-
chain.plugin(CHAIN_ID.PLUGIN.HTML_PREFETCH).use(
|
|
49
|
+
chain.plugin(CHAIN_ID.PLUGIN.HTML_PREFETCH).use(HtmlPreloadOrPrefetchPlugin, [
|
|
50
50
|
prefetch,
|
|
51
51
|
"prefetch",
|
|
52
|
-
HtmlPlugin,
|
|
53
52
|
HTMLCount
|
|
54
53
|
]);
|
|
55
54
|
}
|
|
56
55
|
if (preload) {
|
|
57
|
-
chain.plugin(CHAIN_ID.PLUGIN.HTML_PRELOAD).use(
|
|
58
|
-
preload,
|
|
59
|
-
"preload",
|
|
60
|
-
HtmlPlugin,
|
|
61
|
-
HTMLCount
|
|
62
|
-
]);
|
|
56
|
+
chain.plugin(CHAIN_ID.PLUGIN.HTML_PRELOAD).use(HtmlPreloadOrPrefetchPlugin, [preload, "preload", HTMLCount]);
|
|
63
57
|
}
|
|
64
58
|
}
|
|
65
59
|
);
|
package/dist/plugins/wasm.js
CHANGED
|
@@ -28,7 +28,7 @@ const pluginWasm = () => ({
|
|
|
28
28
|
setup(api) {
|
|
29
29
|
api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
|
|
30
30
|
const config = api.getNormalizedConfig();
|
|
31
|
-
const distPath = (0, import_shared.getDistPath)(config
|
|
31
|
+
const distPath = (0, import_shared.getDistPath)(config, "wasm");
|
|
32
32
|
chain.experiments({
|
|
33
33
|
...chain.get("experiments"),
|
|
34
34
|
asyncWebAssembly: true
|
|
@@ -33,7 +33,6 @@ __export(createCompiler_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(createCompiler_exports);
|
|
35
35
|
var import_shared = require("@rsbuild/shared");
|
|
36
|
-
var import_devMiddleware = require("./devMiddleware");
|
|
37
36
|
var import_initConfigs = require("./initConfigs");
|
|
38
37
|
var import_shared2 = require("../shared");
|
|
39
38
|
async function createCompiler({
|
|
@@ -54,16 +53,23 @@ async function createCompiler({
|
|
|
54
53
|
}
|
|
55
54
|
const compiler = rspackConfigs.length === 1 ? rspack(rspackConfigs[0]) : rspack(rspackConfigs);
|
|
56
55
|
let isFirstCompile = true;
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
let isVersionLogged = false;
|
|
57
|
+
let isCompiling = false;
|
|
58
|
+
const logRspackVersion = () => {
|
|
59
|
+
if (!isVersionLogged) {
|
|
59
60
|
import_shared.logger.start(`Use Rspack v${rspack.rspackVersion}`);
|
|
61
|
+
isVersionLogged = true;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
compiler.hooks.watchRun.tap("rsbuild:compiling", () => {
|
|
65
|
+
logRspackVersion();
|
|
66
|
+
if (!isCompiling) {
|
|
67
|
+
import_shared.logger.start("Compiling...");
|
|
60
68
|
}
|
|
61
|
-
|
|
69
|
+
isCompiling = true;
|
|
62
70
|
});
|
|
63
71
|
if ((0, import_shared.isProd)()) {
|
|
64
|
-
compiler.hooks.run.tap("rsbuild:run",
|
|
65
|
-
import_shared.logger.start(`Use Rspack v${rspack.rspackVersion}`);
|
|
66
|
-
});
|
|
72
|
+
compiler.hooks.run.tap("rsbuild:run", logRspackVersion);
|
|
67
73
|
}
|
|
68
74
|
compiler.hooks.done.tap("rsbuild:done", async (stats) => {
|
|
69
75
|
const obj = stats.toJson({
|
|
@@ -73,7 +79,7 @@ async function createCompiler({
|
|
|
73
79
|
const printTime = (c, index) => {
|
|
74
80
|
if (c.time) {
|
|
75
81
|
const time = (0, import_shared.prettyTime)(c.time / 1e3);
|
|
76
|
-
const target =
|
|
82
|
+
const target = context.targets[index];
|
|
77
83
|
const name = import_shared.TARGET_ID_MAP[target || "web"];
|
|
78
84
|
import_shared.logger.ready(`${name} compiled in ${time}`);
|
|
79
85
|
}
|
|
@@ -99,6 +105,7 @@ async function createCompiler({
|
|
|
99
105
|
isFirstCompile
|
|
100
106
|
});
|
|
101
107
|
}
|
|
108
|
+
isCompiling = false;
|
|
102
109
|
isFirstCompile = false;
|
|
103
110
|
});
|
|
104
111
|
await context.hooks.onAfterCreateCompilerHook.call({ compiler });
|
|
@@ -116,8 +123,9 @@ async function createDevMiddleware(options, customCompiler) {
|
|
|
116
123
|
rspackConfigs
|
|
117
124
|
});
|
|
118
125
|
}
|
|
126
|
+
const { getDevMiddleware } = await Promise.resolve().then(() => __toESM(require("./devMiddleware")));
|
|
119
127
|
return {
|
|
120
|
-
devMiddleware:
|
|
128
|
+
devMiddleware: getDevMiddleware(compiler),
|
|
121
129
|
compiler
|
|
122
130
|
};
|
|
123
131
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { RsbuildConfig, type Context as BaseContext, type BundlerType, type
|
|
1
|
+
import { RsbuildConfig, type Context as BaseContext, type BundlerType, type NormalizedConfig, type CreateRsbuildOptions } from '@rsbuild/shared';
|
|
2
2
|
import type { Context } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Create context by config.
|
|
5
5
|
*/
|
|
6
|
-
export declare function createContextByConfig(options: Required<CreateRsbuildOptions>, bundlerType: BundlerType,
|
|
6
|
+
export declare function createContextByConfig(options: Required<CreateRsbuildOptions>, bundlerType: BundlerType, config?: RsbuildConfig): BaseContext;
|
|
7
7
|
export declare function updateContextByNormalizedConfig(context: BaseContext, config: NormalizedConfig): void;
|
|
8
8
|
export declare function createPublicContext(context: BaseContext): Readonly<BaseContext>;
|
|
9
9
|
/**
|
|
10
10
|
* Generate the actual context used in the build,
|
|
11
11
|
* which can have a lot of overhead and take some side effects.
|
|
12
12
|
*/
|
|
13
|
-
export declare function createContext(options: Required<CreateRsbuildOptions>, userRsbuildConfig: RsbuildConfig): Promise<Context>;
|
|
13
|
+
export declare function createContext(options: Required<CreateRsbuildOptions>, userRsbuildConfig: RsbuildConfig, bundlerType: BundlerType): Promise<Context>;
|