@rsbuild/webpack 0.6.1 → 0.6.2
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/provider.js +35 -3
- package/dist/shared.d.ts +0 -2
- package/dist/shared.js +0 -34
- package/package.json +4 -4
package/dist/provider.js
CHANGED
|
@@ -33,10 +33,8 @@ __export(provider_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(provider_exports);
|
|
34
34
|
var import_shared = require("@rsbuild/shared");
|
|
35
35
|
var import_internal = require("@rsbuild/core/internal");
|
|
36
|
-
var import_shared2 = require("./shared");
|
|
37
36
|
var import_initConfigs = require("./core/initConfigs");
|
|
38
37
|
const webpackProvider = async ({
|
|
39
|
-
plugins,
|
|
40
38
|
pluginManager,
|
|
41
39
|
rsbuildOptions
|
|
42
40
|
}) => {
|
|
@@ -59,7 +57,41 @@ const webpackProvider = async ({
|
|
|
59
57
|
createCompiler,
|
|
60
58
|
publicContext: (0, import_internal.createPublicContext)(context),
|
|
61
59
|
async applyDefaultPlugins() {
|
|
62
|
-
|
|
60
|
+
const allPlugins = await Promise.all([
|
|
61
|
+
import_internal.plugins.basic?.(),
|
|
62
|
+
import_internal.plugins.entry?.(),
|
|
63
|
+
import_internal.plugins.cache?.(),
|
|
64
|
+
import_internal.plugins.target?.(),
|
|
65
|
+
Promise.resolve().then(() => __toESM(require("./plugins/output"))).then((m) => m.pluginOutput()),
|
|
66
|
+
Promise.resolve().then(() => __toESM(require("./plugins/resolve"))).then((m) => m.pluginResolve()),
|
|
67
|
+
import_internal.plugins.fileSize?.(),
|
|
68
|
+
import_internal.plugins.cleanOutput?.(),
|
|
69
|
+
import_internal.plugins.asset(),
|
|
70
|
+
Promise.resolve().then(() => __toESM(require("./plugins/copy"))).then((m) => m.pluginCopy()),
|
|
71
|
+
import_internal.plugins.html(async (tags) => {
|
|
72
|
+
const result = await context.hooks.modifyHTMLTags.call(tags);
|
|
73
|
+
return result[0];
|
|
74
|
+
}),
|
|
75
|
+
import_internal.plugins.wasm(),
|
|
76
|
+
import_internal.plugins.moment(),
|
|
77
|
+
import_internal.plugins.nodeAddons(),
|
|
78
|
+
import_internal.plugins.define(),
|
|
79
|
+
Promise.resolve().then(() => __toESM(require("./plugins/progress"))).then((m) => m.pluginProgress()),
|
|
80
|
+
Promise.resolve().then(() => __toESM(require("./plugins/css"))).then((m) => m.pluginCss()),
|
|
81
|
+
Promise.resolve().then(() => __toESM(require("./plugins/sass"))).then((m) => m.pluginSass()),
|
|
82
|
+
Promise.resolve().then(() => __toESM(require("./plugins/less"))).then((m) => m.pluginLess()),
|
|
83
|
+
import_internal.plugins.bundleAnalyzer(),
|
|
84
|
+
import_internal.plugins.rsdoctor(),
|
|
85
|
+
import_internal.plugins.splitChunks(),
|
|
86
|
+
import_internal.plugins.startUrl?.(),
|
|
87
|
+
import_internal.plugins.inlineChunk(),
|
|
88
|
+
import_internal.plugins.externals(),
|
|
89
|
+
import_internal.plugins.performance(),
|
|
90
|
+
import_internal.plugins.resourceHints(),
|
|
91
|
+
import_internal.plugins.server(),
|
|
92
|
+
import_internal.plugins.moduleFederation()
|
|
93
|
+
]);
|
|
94
|
+
pluginManager.addPlugins(allPlugins);
|
|
63
95
|
},
|
|
64
96
|
async initConfigs() {
|
|
65
97
|
const { webpackConfigs } = await (0, import_initConfigs.initConfigs)({
|
package/dist/shared.d.ts
CHANGED
package/dist/shared.js
CHANGED
|
@@ -28,45 +28,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var shared_exports = {};
|
|
30
30
|
__export(shared_exports, {
|
|
31
|
-
applyDefaultPlugins: () => applyDefaultPlugins,
|
|
32
31
|
getCompiledPath: () => getCompiledPath
|
|
33
32
|
});
|
|
34
33
|
module.exports = __toCommonJS(shared_exports);
|
|
35
34
|
var import_node_fs = __toESM(require("node:fs"));
|
|
36
35
|
var import_node_path = require("node:path");
|
|
37
36
|
var import_shared = require("@rsbuild/shared");
|
|
38
|
-
const applyDefaultPlugins = (plugins) => (0, import_shared.awaitableGetter)([
|
|
39
|
-
plugins.basic?.(),
|
|
40
|
-
plugins.entry?.(),
|
|
41
|
-
plugins.cache?.(),
|
|
42
|
-
plugins.target?.(),
|
|
43
|
-
Promise.resolve().then(() => __toESM(require("./plugins/output"))).then((m) => m.pluginOutput()),
|
|
44
|
-
Promise.resolve().then(() => __toESM(require("./plugins/resolve"))).then((m) => m.pluginResolve()),
|
|
45
|
-
plugins.fileSize?.(),
|
|
46
|
-
plugins.cleanOutput?.(),
|
|
47
|
-
plugins.asset(),
|
|
48
|
-
Promise.resolve().then(() => __toESM(require("./plugins/copy"))).then((m) => m.pluginCopy()),
|
|
49
|
-
plugins.html(),
|
|
50
|
-
plugins.wasm(),
|
|
51
|
-
plugins.moment(),
|
|
52
|
-
plugins.nodeAddons(),
|
|
53
|
-
plugins.define(),
|
|
54
|
-
Promise.resolve().then(() => __toESM(require("./plugins/progress"))).then((m) => m.pluginProgress()),
|
|
55
|
-
Promise.resolve().then(() => __toESM(require("./plugins/css"))).then((m) => m.pluginCss()),
|
|
56
|
-
Promise.resolve().then(() => __toESM(require("./plugins/sass"))).then((m) => m.pluginSass()),
|
|
57
|
-
Promise.resolve().then(() => __toESM(require("./plugins/less"))).then((m) => m.pluginLess()),
|
|
58
|
-
plugins.bundleAnalyzer(),
|
|
59
|
-
plugins.rsdoctor(),
|
|
60
|
-
plugins.splitChunks(),
|
|
61
|
-
plugins.startUrl?.(),
|
|
62
|
-
plugins.inlineChunk(),
|
|
63
|
-
plugins.externals(),
|
|
64
|
-
plugins.performance(),
|
|
65
|
-
plugins.networkPerformance(),
|
|
66
|
-
plugins.preloadOrPrefetch(),
|
|
67
|
-
plugins.server(),
|
|
68
|
-
plugins.moduleFederation()
|
|
69
|
-
]);
|
|
70
37
|
const getCompiledPath = (packageName) => {
|
|
71
38
|
const providerCompilerPath = (0, import_node_path.join)(__dirname, "../../compiled", packageName);
|
|
72
39
|
if (import_node_fs.default.existsSync(providerCompilerPath)) {
|
|
@@ -76,6 +43,5 @@ const getCompiledPath = (packageName) => {
|
|
|
76
43
|
};
|
|
77
44
|
// Annotate the CommonJS export names for ESM import in node:
|
|
78
45
|
0 && (module.exports = {
|
|
79
|
-
applyDefaultPlugins,
|
|
80
46
|
getCompiledPath
|
|
81
47
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"postcss": "^8.4.38",
|
|
35
35
|
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
36
36
|
"webpack": "^5.91.0",
|
|
37
|
-
"@rsbuild/core": "0.6.
|
|
38
|
-
"@rsbuild/shared": "0.6.
|
|
37
|
+
"@rsbuild/core": "0.6.2",
|
|
38
|
+
"@rsbuild/shared": "0.6.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "16.x",
|
|
42
42
|
"typescript": "^5.4.2",
|
|
43
|
-
"@scripts/test-helper": "0.6.
|
|
43
|
+
"@scripts/test-helper": "0.6.2"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public",
|