@rsbuild/core 0.6.13 → 0.6.15
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/http-compression/index.js +2 -2
- package/compiled/http-compression/package.json +1 -1
- package/dist/cli/commands.js +1 -1
- package/dist/cli/prepare.js +1 -1
- package/dist/client/format.js +13 -11
- package/dist/client/hmr.mjs +12 -6
- package/dist/createContext.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/html.js +18 -6
- package/dist/plugins/manifest.js +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 807:
|
|
6
6
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
7
|
|
|
8
8
|
|
|
@@ -178,7 +178,7 @@ module.exports = require("zlib");
|
|
|
178
178
|
/******/ // startup
|
|
179
179
|
/******/ // Load entry module and return exports
|
|
180
180
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
181
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
181
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(807);
|
|
182
182
|
/******/ module.exports = __webpack_exports__;
|
|
183
183
|
/******/
|
|
184
184
|
/******/ })()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"http-compression","author":{"email":"josefrancisco.verdu@gmail.com","name":"Kiko Beats","url":"https://kikobeats.com"},"version":"1.0.
|
|
1
|
+
{"name":"http-compression","author":{"email":"josefrancisco.verdu@gmail.com","name":"Kiko Beats","url":"https://kikobeats.com"},"version":"1.0.20","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
package/dist/cli/commands.js
CHANGED
|
@@ -39,7 +39,7 @@ const applyServerOptions = (command) => {
|
|
|
39
39
|
command.option("-o --open [url]", "open the page in browser on startup").option("--port <port>", "specify a port number for server to listen").option("--host <host>", "specify the host that the server listens to");
|
|
40
40
|
};
|
|
41
41
|
function runCli() {
|
|
42
|
-
import_commander.program.name("rsbuild").usage("<command> [options]").version("0.6.
|
|
42
|
+
import_commander.program.name("rsbuild").usage("<command> [options]").version("0.6.15");
|
|
43
43
|
const devCommand = import_commander.program.command("dev");
|
|
44
44
|
const buildCommand = import_commander.program.command("build");
|
|
45
45
|
const previewCommand = import_commander.program.command("preview");
|
package/dist/cli/prepare.js
CHANGED
|
@@ -34,7 +34,7 @@ function prepareCli() {
|
|
|
34
34
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
|
|
35
35
|
console.log();
|
|
36
36
|
}
|
|
37
|
-
import_rslog.logger.greet(` ${`Rsbuild v${"0.6.
|
|
37
|
+
import_rslog.logger.greet(` ${`Rsbuild v${"0.6.15"}`}
|
|
38
38
|
`);
|
|
39
39
|
}
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/client/format.js
CHANGED
|
@@ -22,17 +22,19 @@ __export(format_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(format_exports);
|
|
24
24
|
function resolveFileName(stats) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
if (stats.moduleIdentifier) {
|
|
26
|
+
const regex = /(?:\!|^)([^!]+)$/;
|
|
27
|
+
const matched = stats.moduleIdentifier.match(regex);
|
|
28
|
+
if (matched) {
|
|
29
|
+
const fileName = matched.pop();
|
|
30
|
+
if (fileName) {
|
|
31
|
+
return `File: ${fileName}:1:1
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return `File: ${stats.moduleName}
|
|
37
|
+
`;
|
|
36
38
|
}
|
|
37
39
|
function formatMessage(stats) {
|
|
38
40
|
let lines = [];
|
package/dist/client/hmr.mjs
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
// src/client/format.ts
|
|
2
2
|
function resolveFileName(stats) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
if (stats.moduleIdentifier) {
|
|
4
|
+
const regex = /(?:\!|^)([^!]+)$/;
|
|
5
|
+
const matched = stats.moduleIdentifier.match(regex);
|
|
6
|
+
if (matched) {
|
|
7
|
+
const fileName = matched.pop();
|
|
8
|
+
if (fileName) {
|
|
9
|
+
return `File: ${fileName}:1:1
|
|
10
|
+
`;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return `File: ${stats.moduleName}
|
|
9
15
|
`;
|
|
10
16
|
}
|
|
11
17
|
function formatMessage(stats) {
|
package/dist/createContext.js
CHANGED
|
@@ -44,7 +44,7 @@ async function createContextByConfig(options, bundlerType, config = {}) {
|
|
|
44
44
|
const context = {
|
|
45
45
|
entry: (0, import_entry.getEntryObject)(config, "web"),
|
|
46
46
|
targets: config.output?.targets || [],
|
|
47
|
-
version: "0.6.
|
|
47
|
+
version: "0.6.15",
|
|
48
48
|
rootPath,
|
|
49
49
|
distPath,
|
|
50
50
|
cachePath,
|
package/dist/index.js
CHANGED
|
@@ -40,7 +40,7 @@ var import_config = require("./config");
|
|
|
40
40
|
var import_shared = require("@rsbuild/shared");
|
|
41
41
|
var import_mergeConfig = require("./mergeConfig");
|
|
42
42
|
var import_constants = require("./constants");
|
|
43
|
-
const version = "0.6.
|
|
43
|
+
const version = "0.6.15";
|
|
44
44
|
// Annotate the CommonJS export names for ESM import in node:
|
|
45
45
|
0 && (module.exports = {
|
|
46
46
|
PLUGIN_CSS_NAME,
|
package/dist/plugins/html.js
CHANGED
|
@@ -135,13 +135,22 @@ function getTemplateParameters(entryName, config, assetPrefix) {
|
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
function getChunks(entryName, entryValue) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (
|
|
141
|
-
|
|
138
|
+
const chunks = [entryName];
|
|
139
|
+
for (const item of entryValue) {
|
|
140
|
+
if (!(0, import_shared.isPlainObject)(item)) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const { dependOn } = item;
|
|
144
|
+
if (!dependOn) {
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
if (typeof dependOn === "string") {
|
|
148
|
+
chunks.unshift(dependOn);
|
|
149
|
+
} else {
|
|
150
|
+
chunks.unshift(...dependOn);
|
|
142
151
|
}
|
|
143
152
|
}
|
|
144
|
-
return
|
|
153
|
+
return chunks;
|
|
145
154
|
}
|
|
146
155
|
const getTagConfig = (api) => {
|
|
147
156
|
const config = api.getNormalizedConfig();
|
|
@@ -176,7 +185,7 @@ const pluginHtml = (modifyTagsFn) => ({
|
|
|
176
185
|
const entryValue = entries[entryName].values();
|
|
177
186
|
const chunks = getChunks(
|
|
178
187
|
entryName,
|
|
179
|
-
//
|
|
188
|
+
// EntryDescription type is different between webpack and Rspack
|
|
180
189
|
entryValue
|
|
181
190
|
);
|
|
182
191
|
const inject = getInject(entryName, config);
|
|
@@ -203,6 +212,9 @@ const pluginHtml = (modifyTagsFn) => ({
|
|
|
203
212
|
templateParameters,
|
|
204
213
|
scriptLoading: config.html.scriptLoading
|
|
205
214
|
};
|
|
215
|
+
if (chunks.length > 1) {
|
|
216
|
+
pluginOptions.chunksSortMode = "manual";
|
|
217
|
+
}
|
|
206
218
|
const htmlInfo = {};
|
|
207
219
|
htmlInfoMap[entryName] = htmlInfo;
|
|
208
220
|
if (templateContent) {
|
package/dist/plugins/manifest.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"core-js": "~3.36.0",
|
|
54
54
|
"html-webpack-plugin": "npm:html-rspack-plugin@5.7.2",
|
|
55
55
|
"postcss": "^8.4.38",
|
|
56
|
-
"@rsbuild/shared": "0.6.
|
|
56
|
+
"@rsbuild/shared": "0.6.15"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "18.x",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"rspack-manifest-plugin": "5.0.0",
|
|
65
65
|
"dotenv": "16.4.5",
|
|
66
66
|
"dotenv-expand": "11.0.6",
|
|
67
|
-
"http-compression": "1.0.
|
|
67
|
+
"http-compression": "1.0.20",
|
|
68
68
|
"launch-editor-middleware": "^2.6.1",
|
|
69
69
|
"on-finished": "2.4.1",
|
|
70
70
|
"open": "^8.4.0",
|