@rsbuild/webpack 0.3.7 → 0.3.9
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/core/initConfigs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RsbuildTarget } from '@rsbuild/shared';
|
|
2
|
-
import type
|
|
2
|
+
import { type InternalContext } from '@rsbuild/core/provider';
|
|
3
3
|
import type { WebpackConfig } from '../types';
|
|
4
4
|
export declare function generateWebpackConfig({ target, context, }: {
|
|
5
5
|
target: RsbuildTarget;
|
|
@@ -32,6 +32,7 @@ __export(webpackConfig_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(webpackConfig_exports);
|
|
34
34
|
var import_shared = require("@rsbuild/shared");
|
|
35
|
+
var import_provider = require("@rsbuild/core/provider");
|
|
35
36
|
var import_shared2 = require("../shared");
|
|
36
37
|
async function modifyWebpackChain(context, utils, chain) {
|
|
37
38
|
(0, import_shared.debug)("modify webpack chain");
|
|
@@ -67,8 +68,6 @@ async function modifyWebpackConfig(context, webpackConfig, utils) {
|
|
|
67
68
|
async function getChainUtils(target) {
|
|
68
69
|
const { default: webpack } = await Promise.resolve().then(() => __toESM(require("webpack")));
|
|
69
70
|
const { getHTMLPlugin } = await Promise.resolve().then(() => __toESM(require("@rsbuild/core/provider")));
|
|
70
|
-
const HtmlPlugin = getHTMLPlugin();
|
|
71
|
-
const nodeEnv = (0, import_shared.getNodeEnv)();
|
|
72
71
|
const nameMap = {
|
|
73
72
|
web: "client",
|
|
74
73
|
node: "server",
|
|
@@ -76,18 +75,11 @@ async function getChainUtils(target) {
|
|
|
76
75
|
"service-worker": "service-worker"
|
|
77
76
|
};
|
|
78
77
|
return {
|
|
79
|
-
|
|
78
|
+
...(0, import_provider.getChainUtils)(target),
|
|
80
79
|
name: nameMap[target] || "",
|
|
81
|
-
target,
|
|
82
80
|
webpack,
|
|
83
|
-
isProd: nodeEnv === "production",
|
|
84
|
-
isServer: target === "node",
|
|
85
|
-
isServiceWorker: target === "service-worker",
|
|
86
|
-
isWebWorker: target === "web-worker",
|
|
87
|
-
CHAIN_ID: import_shared.CHAIN_ID,
|
|
88
81
|
getCompiledPath: import_shared2.getCompiledPath,
|
|
89
|
-
|
|
90
|
-
HtmlWebpackPlugin: HtmlPlugin
|
|
82
|
+
HtmlWebpackPlugin: getHTMLPlugin()
|
|
91
83
|
};
|
|
92
84
|
}
|
|
93
85
|
async function getConfigUtils(config, chainUtils) {
|
package/dist/shared.js
CHANGED
|
@@ -58,6 +58,7 @@ const applyDefaultPlugins = (plugins) => (0, import_shared2.awaitableGetter)([
|
|
|
58
58
|
Promise.resolve().then(() => __toESM(require("./plugins/sass"))).then((m) => m.pluginSass()),
|
|
59
59
|
Promise.resolve().then(() => __toESM(require("./plugins/less"))).then((m) => m.pluginLess()),
|
|
60
60
|
plugins.bundleAnalyzer(),
|
|
61
|
+
plugins.rsdoctor(),
|
|
61
62
|
plugins.splitChunks(),
|
|
62
63
|
plugins.startUrl?.(),
|
|
63
64
|
plugins.inlineChunk(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
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.3.
|
|
39
|
-
"@rsbuild/shared": "0.3.
|
|
38
|
+
"@rsbuild/core": "0.3.9",
|
|
39
|
+
"@rsbuild/shared": "0.3.9"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "16.x",
|
|
43
43
|
"typescript": "^5.3.0",
|
|
44
|
-
"@scripts/test-helper": "0.3.
|
|
44
|
+
"@scripts/test-helper": "0.3.9"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public",
|