@rsbuild/core 0.6.2 → 0.6.3
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/cli/commands.js +1 -1
- package/dist/cli/prepare.js +1 -1
- package/dist/config.js +2 -2
- package/dist/index.js +1 -1
- package/dist/plugins/moment.js +2 -33
- package/dist/provider/createContext.js +1 -1
- package/dist/provider/initPlugins.js +1 -1
- package/dist/provider/rspackConfig.js +2 -0
- package/dist/provider/shared.d.ts +1 -1
- package/dist/provider/shared.js +1 -1
- package/package.json +3 -3
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.3");
|
|
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.3"}`}
|
|
38
38
|
`);
|
|
39
39
|
}
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/config.js
CHANGED
|
@@ -160,8 +160,8 @@ function getDefaultEntry(root) {
|
|
|
160
160
|
"js",
|
|
161
161
|
"tsx",
|
|
162
162
|
"jsx",
|
|
163
|
-
"
|
|
164
|
-
"
|
|
163
|
+
"mjs",
|
|
164
|
+
"cjs"
|
|
165
165
|
].map((ext) => (0, import_node_path.join)(root, `src/index.${ext}`));
|
|
166
166
|
const entryFile = (0, import_shared.findExists)(files);
|
|
167
167
|
if (entryFile) {
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var import_config = require("./config");
|
|
|
38
38
|
var import_shared = require("@rsbuild/shared");
|
|
39
39
|
var import_mergeConfig = require("./mergeConfig");
|
|
40
40
|
var import_constants = require("./constants");
|
|
41
|
-
const version = "0.6.
|
|
41
|
+
const version = "0.6.3";
|
|
42
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
43
43
|
0 && (module.exports = {
|
|
44
44
|
PLUGIN_CSS_NAME,
|
package/dist/plugins/moment.js
CHANGED
|
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -17,48 +16,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
16
|
return to;
|
|
18
17
|
};
|
|
19
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var __publicField = (obj, key, value) => {
|
|
21
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
-
return value;
|
|
23
|
-
};
|
|
24
19
|
var moment_exports = {};
|
|
25
20
|
__export(moment_exports, {
|
|
26
21
|
pluginMoment: () => pluginMoment
|
|
27
22
|
});
|
|
28
23
|
module.exports = __toCommonJS(moment_exports);
|
|
29
|
-
class IgnorePlugin {
|
|
30
|
-
constructor(options) {
|
|
31
|
-
__publicField(this, "options");
|
|
32
|
-
this.options = options;
|
|
33
|
-
this.checkIgnore = this.checkIgnore.bind(this);
|
|
34
|
-
}
|
|
35
|
-
checkIgnore(resolveData) {
|
|
36
|
-
if ("resourceRegExp" in this.options && this.options.resourceRegExp && this.options.resourceRegExp.test(resolveData.request)) {
|
|
37
|
-
if ("contextRegExp" in this.options && this.options.contextRegExp) {
|
|
38
|
-
if (this.options.contextRegExp.test(resolveData.context)) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
} else {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
apply(compiler) {
|
|
47
|
-
compiler.hooks.normalModuleFactory.tap("IgnorePlugin", (nmf) => {
|
|
48
|
-
nmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore);
|
|
49
|
-
});
|
|
50
|
-
compiler.hooks.contextModuleFactory.tap("IgnorePlugin", (cmf) => {
|
|
51
|
-
cmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
24
|
const pluginMoment = () => ({
|
|
56
25
|
name: "rsbuild:moment",
|
|
57
26
|
setup(api) {
|
|
58
|
-
api.modifyBundlerChain(async (chain) => {
|
|
27
|
+
api.modifyBundlerChain(async (chain, { bundler }) => {
|
|
59
28
|
const config = api.getNormalizedConfig();
|
|
60
29
|
if (config.performance.removeMomentLocale) {
|
|
61
|
-
chain.plugin("remove-moment-locale").use(IgnorePlugin, [
|
|
30
|
+
chain.plugin("remove-moment-locale").use(bundler.IgnorePlugin, [
|
|
62
31
|
{
|
|
63
32
|
resourceRegExp: /^\.\/locale$/,
|
|
64
33
|
contextRegExp: /moment$/
|
|
@@ -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.3",
|
|
48
48
|
rootPath,
|
|
49
49
|
distPath,
|
|
50
50
|
cachePath,
|
|
@@ -115,6 +115,7 @@ async function generateRspackConfig({
|
|
|
115
115
|
const {
|
|
116
116
|
BannerPlugin,
|
|
117
117
|
DefinePlugin,
|
|
118
|
+
IgnorePlugin,
|
|
118
119
|
ProvidePlugin,
|
|
119
120
|
HotModuleReplacementPlugin
|
|
120
121
|
} = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
|
|
@@ -123,6 +124,7 @@ async function generateRspackConfig({
|
|
|
123
124
|
bundler: {
|
|
124
125
|
BannerPlugin,
|
|
125
126
|
DefinePlugin,
|
|
127
|
+
IgnorePlugin,
|
|
126
128
|
ProvidePlugin,
|
|
127
129
|
HotModuleReplacementPlugin
|
|
128
130
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isMultiCompiler, type Stats, type MultiStats, type StatsError } from '@rsbuild/shared';
|
|
2
2
|
import type { StatsCompilation, StatsValue } from '@rspack/core';
|
|
3
|
-
export declare const rspackMinVersion = "0.6.
|
|
3
|
+
export declare const rspackMinVersion = "0.6.2";
|
|
4
4
|
export declare const isSatisfyRspackVersion: (originalVersion: string) => Promise<boolean>;
|
|
5
5
|
export declare const getCompiledPath: (packageName: string) => string;
|
|
6
6
|
export declare const BUILTIN_LOADER = "builtin:";
|
package/dist/provider/shared.js
CHANGED
|
@@ -32,7 +32,7 @@ var import_node_path = require("node:path");
|
|
|
32
32
|
var import_shared = require("@rsbuild/shared");
|
|
33
33
|
var import_shared2 = require("@rsbuild/shared");
|
|
34
34
|
var import_formatStats = require("../client/formatStats");
|
|
35
|
-
const rspackMinVersion = "0.6.
|
|
35
|
+
const rspackMinVersion = "0.6.2";
|
|
36
36
|
const compareSemver = (version1, version2) => {
|
|
37
37
|
const parts1 = version1.split(".").map(Number);
|
|
38
38
|
const parts2 = version2.split(".").map(Number);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"types.d.ts"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@rspack/core": "0.6.
|
|
51
|
+
"@rspack/core": "0.6.2",
|
|
52
52
|
"@swc/helpers": "0.5.3",
|
|
53
53
|
"core-js": "~3.36.0",
|
|
54
54
|
"html-webpack-plugin": "npm:html-rspack-plugin@5.6.2",
|
|
55
55
|
"postcss": "^8.4.38",
|
|
56
|
-
"@rsbuild/shared": "0.6.
|
|
56
|
+
"@rsbuild/shared": "0.6.3"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "16.x",
|