@rsbuild/webpack 0.0.20 → 0.0.21
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/plugins/copy.js +2 -2
- package/dist/provider.js +2 -2
- package/dist/shared/fs.js +12 -2
- package/package.json +8 -18
package/dist/plugins/copy.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(copy_exports, {
|
|
|
31
31
|
pluginCopy: () => pluginCopy
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(copy_exports);
|
|
34
|
-
var
|
|
34
|
+
var import_fs = __toESM(require("fs"));
|
|
35
35
|
const pluginCopy = () => ({
|
|
36
36
|
name: "plugin-copy",
|
|
37
37
|
setup(api) {
|
|
@@ -52,7 +52,7 @@ const pluginCopy = () => ({
|
|
|
52
52
|
);
|
|
53
53
|
if (copyPlugin) {
|
|
54
54
|
const isContextNotExists = copyPlugin.patterns.every(
|
|
55
|
-
(pattern) => typeof pattern !== "string" && pattern.context && !
|
|
55
|
+
(pattern) => typeof pattern !== "string" && pattern.context && !import_fs.default.existsSync(pattern.context)
|
|
56
56
|
);
|
|
57
57
|
if (isContextNotExists) {
|
|
58
58
|
config.plugins = (_b = config.plugins) == null ? void 0 : _b.filter(
|
package/dist/provider.js
CHANGED
|
@@ -78,8 +78,8 @@ function webpackProvider({
|
|
|
78
78
|
options
|
|
79
79
|
);
|
|
80
80
|
},
|
|
81
|
-
async preview() {
|
|
82
|
-
return (0, import_server.startProdServer)(context, context.config);
|
|
81
|
+
async preview(options) {
|
|
82
|
+
return (0, import_server.startProdServer)(context, context.config, options);
|
|
83
83
|
},
|
|
84
84
|
async build(options) {
|
|
85
85
|
const { build: buildImpl, webpackBuild } = await Promise.resolve().then(() => __toESM(require("./core/build")));
|
package/dist/shared/fs.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,18 +17,26 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
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
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
var fs_exports = {};
|
|
20
30
|
__export(fs_exports, {
|
|
21
31
|
getCompiledPath: () => getCompiledPath
|
|
22
32
|
});
|
|
23
33
|
module.exports = __toCommonJS(fs_exports);
|
|
34
|
+
var import_fs = __toESM(require("fs"));
|
|
24
35
|
var import_path = require("path");
|
|
25
36
|
var import_shared = require("@rsbuild/shared");
|
|
26
|
-
var import_fs_extra = require("@rsbuild/shared/fs-extra");
|
|
27
37
|
const getCompiledPath = (packageName) => {
|
|
28
38
|
const providerCompilerPath = (0, import_path.join)(__dirname, "../../compiled", packageName);
|
|
29
|
-
if (
|
|
39
|
+
if (import_fs.default.existsSync(providerCompilerPath)) {
|
|
30
40
|
return providerCompilerPath;
|
|
31
41
|
} else {
|
|
32
42
|
return (0, import_shared.getSharedPkgCompiledPath)(packageName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,16 +24,6 @@
|
|
|
24
24
|
},
|
|
25
25
|
"main": "./dist/index.js",
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
|
-
"typesVersions": {
|
|
28
|
-
"*": {
|
|
29
|
-
"plugin-babel": [
|
|
30
|
-
"./dist/plugins/babel.d.ts"
|
|
31
|
-
],
|
|
32
|
-
"plugin-css": [
|
|
33
|
-
"./dist/plugins/css.d.ts"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
27
|
"files": [
|
|
38
28
|
"static",
|
|
39
29
|
"compiled",
|
|
@@ -51,7 +41,7 @@
|
|
|
51
41
|
"fast-glob": "^3.3.1",
|
|
52
42
|
"glob": "^9.3.5",
|
|
53
43
|
"globby": "^11.1.0",
|
|
54
|
-
"html-webpack-plugin": "npm:html-rspack-plugin@5.5.
|
|
44
|
+
"html-webpack-plugin": "npm:html-rspack-plugin@5.5.5",
|
|
55
45
|
"lodash": "^4.17.21",
|
|
56
46
|
"mini-css-extract-plugin": "2.7.6",
|
|
57
47
|
"postcss": "8.4.31",
|
|
@@ -61,11 +51,11 @@
|
|
|
61
51
|
"ts-loader": "9.4.4",
|
|
62
52
|
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
63
53
|
"webpack": "^5.89.0",
|
|
64
|
-
"@rsbuild/babel-preset": "0.0.
|
|
65
|
-
"@rsbuild/core": "0.0.
|
|
66
|
-
"@rsbuild/plugin-
|
|
67
|
-
"@rsbuild/
|
|
68
|
-
"@rsbuild/
|
|
54
|
+
"@rsbuild/babel-preset": "0.0.21",
|
|
55
|
+
"@rsbuild/core": "0.0.21",
|
|
56
|
+
"@rsbuild/plugin-babel": "0.0.21",
|
|
57
|
+
"@rsbuild/plugin-css-minimizer": "0.0.21",
|
|
58
|
+
"@rsbuild/shared": "0.0.21"
|
|
69
59
|
},
|
|
70
60
|
"devDependencies": {
|
|
71
61
|
"@types/lodash": "^4.14.200",
|
|
@@ -73,7 +63,7 @@
|
|
|
73
63
|
"react": "^18.2.0",
|
|
74
64
|
"react-dom": "^18.2.0",
|
|
75
65
|
"typescript": "^5.2.2",
|
|
76
|
-
"@rsbuild/test-helper": "0.0.
|
|
66
|
+
"@rsbuild/test-helper": "0.0.21"
|
|
77
67
|
},
|
|
78
68
|
"engines": {
|
|
79
69
|
"node": ">=14.0.0"
|