@rsbuild/core 1.1.2 → 1.1.4
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/bin/rsbuild.js +2 -10
- package/compiled/css-loader/index.js +46 -46
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss/index.js +135 -117
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-load-config/index.js +10 -10
- package/compiled/postcss-loader/index.js +11 -11
- package/compiled/rspack-chain/index.d.ts +3 -0
- package/compiled/rspack-chain/index.js +69 -66
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/client/hmr.js +10 -1
- package/dist/index.cjs +459 -507
- package/dist/index.js +362 -412
- package/dist-types/cli/commands.d.ts +1 -1
- package/dist-types/cli/index.d.ts +1 -0
- package/dist-types/config.d.ts +29 -3
- package/dist-types/helpers/stats.d.ts +2 -3
- package/dist-types/index.d.ts +2 -1
- package/dist-types/internal.d.ts +0 -2
- package/package.json +6 -8
- package/dist/index.cjs.LICENSE.txt +0 -13
- package/dist/index.js.LICENSE.txt +0 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runCLI(): Promise<void>;
|
package/dist-types/config.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type ConfigParams = {
|
|
|
12
12
|
env: string;
|
|
13
13
|
command: string;
|
|
14
14
|
envMode?: string;
|
|
15
|
+
meta?: Record<string, unknown>;
|
|
15
16
|
};
|
|
16
17
|
export type RsbuildConfigAsyncFn = (env: ConfigParams) => Promise<RsbuildConfig>;
|
|
17
18
|
export type RsbuildConfigSyncFn = (env: ConfigParams) => RsbuildConfig;
|
|
@@ -25,14 +26,39 @@ export declare function defineConfig(config: RsbuildConfigSyncFn): RsbuildConfig
|
|
|
25
26
|
export declare function defineConfig(config: RsbuildConfigAsyncFn): RsbuildConfigAsyncFn;
|
|
26
27
|
export declare function defineConfig(config: RsbuildConfigExport): RsbuildConfigExport;
|
|
27
28
|
export declare function watchFilesForRestart(files: string[], root: string, isBuildWatch: boolean, watchOptions?: ChokidarOptions): Promise<void>;
|
|
28
|
-
export
|
|
29
|
+
export type LoadConfigOptions = {
|
|
30
|
+
/**
|
|
31
|
+
* The root path to resolve the config file.
|
|
32
|
+
* @default process.cwd()
|
|
33
|
+
*/
|
|
29
34
|
cwd?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The path to the config file, can be a relative or absolute path.
|
|
37
|
+
* If `path` is not provided, the function will search for the config file in the `cwd`.
|
|
38
|
+
*/
|
|
30
39
|
path?: string;
|
|
40
|
+
/**
|
|
41
|
+
* A custom meta object to be passed into the config function of `defineConfig`.
|
|
42
|
+
*/
|
|
43
|
+
meta?: Record<string, unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* The `envMode` passed into the config function of `defineConfig`.
|
|
46
|
+
* @default process.env.NODE_ENV
|
|
47
|
+
*/
|
|
31
48
|
envMode?: string;
|
|
32
|
-
}
|
|
49
|
+
};
|
|
50
|
+
export type LoadConfigResult = {
|
|
51
|
+
/**
|
|
52
|
+
* The loaded configuration object.
|
|
53
|
+
*/
|
|
33
54
|
content: RsbuildConfig;
|
|
55
|
+
/**
|
|
56
|
+
* The path to the loaded configuration file.
|
|
57
|
+
* Return `null` if the configuration file is not found.
|
|
58
|
+
*/
|
|
34
59
|
filePath: string | null;
|
|
35
|
-
}
|
|
60
|
+
};
|
|
61
|
+
export declare function loadConfig({ cwd, path, envMode, meta, }?: LoadConfigOptions): Promise<LoadConfigResult>;
|
|
36
62
|
export declare const getRsbuildInspectConfig: ({ normalizedConfig, inspectOptions, pluginManager, }: {
|
|
37
63
|
normalizedConfig: NormalizedConfig;
|
|
38
64
|
inspectOptions: InspectConfigOptions;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { StatsCompilation
|
|
1
|
+
import type { StatsCompilation } from '@rspack/core';
|
|
2
2
|
import type { Rspack } from '../types';
|
|
3
|
-
import { isMultiCompiler } from './';
|
|
4
3
|
export declare const getAllStatsErrors: (statsData: StatsCompilation) => Rspack.StatsError[] | undefined;
|
|
5
4
|
export declare const getAllStatsWarnings: (statsData: StatsCompilation) => Rspack.StatsError[] | undefined;
|
|
6
|
-
export declare function getStatsOptions(compiler:
|
|
5
|
+
export declare function getStatsOptions(compiler: Rspack.Compiler | Rspack.MultiCompiler): Rspack.StatsOptions;
|
|
7
6
|
export declare function formatStats(statsData: Rspack.StatsCompilation, hasErrors: boolean): {
|
|
8
7
|
message?: string;
|
|
9
8
|
level?: string;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ import type * as Rspack from '@rspack/core';
|
|
|
7
7
|
import * as __internalHelper from './internal';
|
|
8
8
|
export { loadEnv } from './loadEnv';
|
|
9
9
|
export { createRsbuild } from './createRsbuild';
|
|
10
|
-
export { loadConfig, defineConfig } from './config';
|
|
10
|
+
export { loadConfig, defineConfig, type LoadConfigOptions, type LoadConfigResult, } from './config';
|
|
11
|
+
export { runCLI } from './cli';
|
|
11
12
|
export declare const version: string;
|
|
12
13
|
export { rspack };
|
|
13
14
|
export type { Rspack };
|
package/dist-types/internal.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "~1.1.
|
|
49
|
+
"@rspack/core": "~1.1.2",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
51
|
"@swc/helpers": "^0.5.15",
|
|
52
52
|
"core-js": "~3.39.0"
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
"@rslib/core": "0.0.18",
|
|
56
56
|
"@types/connect": "3.4.38",
|
|
57
57
|
"@types/fs-extra": "^11.0.4",
|
|
58
|
-
"@types/
|
|
59
|
-
"@types/node": "^22.9.0",
|
|
58
|
+
"@types/node": "^22.9.1",
|
|
60
59
|
"@types/on-finished": "2.3.4",
|
|
61
60
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
62
61
|
"@types/ws": "^8.5.13",
|
|
@@ -68,18 +67,17 @@
|
|
|
68
67
|
"css-loader": "7.1.2",
|
|
69
68
|
"deepmerge": "^4.3.1",
|
|
70
69
|
"dotenv": "16.4.5",
|
|
71
|
-
"dotenv-expand": "11.0.
|
|
70
|
+
"dotenv-expand": "11.0.7",
|
|
72
71
|
"fs-extra": "^11.2.0",
|
|
73
72
|
"html-rspack-plugin": "6.0.2",
|
|
74
73
|
"http-proxy-middleware": "^2.0.6",
|
|
75
|
-
"is-glob": "^4.0.3",
|
|
76
74
|
"jiti": "^1.21.6",
|
|
77
75
|
"launch-editor-middleware": "^2.9.1",
|
|
78
76
|
"mrmime": "^2.0.0",
|
|
79
77
|
"on-finished": "2.4.1",
|
|
80
78
|
"open": "^8.4.0",
|
|
81
79
|
"picocolors": "^1.1.1",
|
|
82
|
-
"postcss": "^8.4.
|
|
80
|
+
"postcss": "^8.4.49",
|
|
83
81
|
"postcss-load-config": "6.0.1",
|
|
84
82
|
"postcss-loader": "8.1.1",
|
|
85
83
|
"prebundle": "1.2.5",
|
|
@@ -87,7 +85,7 @@
|
|
|
87
85
|
"rimraf": "^6.0.1",
|
|
88
86
|
"rsbuild-dev-middleware": "0.1.2",
|
|
89
87
|
"rslog": "^1.2.3",
|
|
90
|
-
"rspack-chain": "^1.0
|
|
88
|
+
"rspack-chain": "^1.1.0",
|
|
91
89
|
"rspack-manifest-plugin": "5.0.2",
|
|
92
90
|
"sirv": "^3.0.0",
|
|
93
91
|
"style-loader": "3.3.4",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
12
|
-
* Released under the MIT License.
|
|
13
|
-
*/
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
12
|
-
* Released under the MIT License.
|
|
13
|
-
*/
|