@rsbuild/webpack 0.4.14 → 0.4.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.15",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"terser-webpack-plugin": "5.3.10",
|
|
36
36
|
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
37
37
|
"webpack": "^5.89.0",
|
|
38
|
-
"@rsbuild/core": "0.4.
|
|
39
|
-
"@rsbuild/shared": "0.4.
|
|
38
|
+
"@rsbuild/core": "0.4.15",
|
|
39
|
+
"@rsbuild/shared": "0.4.15"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "16.x",
|
|
43
43
|
"typescript": "^5.4.2",
|
|
44
|
-
"@scripts/test-helper": "0.4.
|
|
44
|
+
"@scripts/test-helper": "0.4.15"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public",
|
package/dist/exports/webpack.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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 webpack_exports = {};
|
|
30
|
-
__export(webpack_exports, {
|
|
31
|
-
default: () => webpack_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(webpack_exports);
|
|
34
|
-
var import_webpack = __toESM(require("webpack"));
|
|
35
|
-
var webpack_default = import_webpack.default;
|
package/dist/plugins/server.d.ts
DELETED
package/dist/plugins/server.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
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 server_exports = {};
|
|
30
|
-
__export(server_exports, {
|
|
31
|
-
pluginServer: () => pluginServer
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(server_exports);
|
|
34
|
-
var import_node_fs = __toESM(require("node:fs"));
|
|
35
|
-
var import_node_path = require("node:path");
|
|
36
|
-
const pluginServer = () => ({
|
|
37
|
-
name: "rsbuild:server",
|
|
38
|
-
setup(api) {
|
|
39
|
-
api.modifyBundlerChain(async (chain, { isProd }) => {
|
|
40
|
-
const config = api.getNormalizedConfig();
|
|
41
|
-
if (isProd && config.server?.publicDir) {
|
|
42
|
-
const { name, copyOnBuild } = config.server.publicDir;
|
|
43
|
-
if (!copyOnBuild || !name) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const publicDir = (0, import_node_path.isAbsolute)(name) ? name : (0, import_node_path.join)(api.context.rootPath, name);
|
|
47
|
-
const publicPattern = [
|
|
48
|
-
{
|
|
49
|
-
from: publicDir,
|
|
50
|
-
to: "",
|
|
51
|
-
noErrorOnMissing: true
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
if (!import_node_fs.default.existsSync(publicDir)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
const { default: CopyPlugin } = await Promise.resolve().then(() => __toESM(require("../../compiled/copy-webpack-plugin")));
|
|
58
|
-
chain.plugin("public-dir").use(CopyPlugin, [
|
|
59
|
-
{
|
|
60
|
-
patterns: publicPattern
|
|
61
|
-
}
|
|
62
|
-
]);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
-
0 && (module.exports = {
|
|
69
|
-
pluginServer
|
|
70
|
-
});
|