@rsbuild/core 2.0.0-beta.0 → 2.0.0-beta.1
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/compiled/css-loader/index.js +2 -2
- package/compiled/css-loader/package.json +1 -1
- package/compiled/html-rspack-plugin/index.d.ts +102 -1
- package/compiled/html-rspack-plugin/index.js +848 -5
- package/compiled/http-proxy-middleware/index.d.ts +268 -43
- package/compiled/http-proxy-middleware/index.js +2601 -1753
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/dist/131.js +33 -30
- package/dist/manifest-plugin.js +526 -4
- package/dist-types/types/config.d.ts +14 -9
- package/package.json +4 -5
|
@@ -230,20 +230,17 @@ export type ProxyBypass = (req: IncomingMessage, res: ServerResponse, proxyOptio
|
|
|
230
230
|
export type { ProxyFilter };
|
|
231
231
|
export type ProxyOptions = HttpProxyOptions & {
|
|
232
232
|
/**
|
|
233
|
-
*
|
|
233
|
+
* Use the `bypass` function to skip the proxy.
|
|
234
|
+
* Inside the function, you have access to the request, response, and proxy options.
|
|
234
235
|
* - Return `null` or `undefined` to continue processing the request with proxy.
|
|
235
|
-
* - Return `true` to continue processing the request
|
|
236
|
+
* - Return `true` to skip the proxy and continue processing the request.
|
|
236
237
|
* - Return `false` to produce a 404 error for the request.
|
|
237
|
-
* - Return a path to
|
|
238
|
+
* - Return a specific path to replace the original request path.
|
|
238
239
|
* - Return a Promise to handle the request asynchronously.
|
|
239
240
|
*/
|
|
240
241
|
bypass?: ProxyBypass;
|
|
241
|
-
/**
|
|
242
|
-
* Used to proxy multiple specified paths to the same target.
|
|
243
|
-
*/
|
|
244
|
-
context?: ProxyFilter;
|
|
245
242
|
};
|
|
246
|
-
export type ProxyConfig = Record<string, string | ProxyOptions> | ProxyOptions[]
|
|
243
|
+
export type ProxyConfig = Record<string, string | ProxyOptions> | ProxyOptions[];
|
|
247
244
|
export type HistoryApiFallbackContext = {
|
|
248
245
|
match: RegExpMatchArray;
|
|
249
246
|
parsedUrl: URL;
|
|
@@ -665,7 +662,15 @@ export interface NormalizedPerformanceConfig extends PerformanceConfig {
|
|
|
665
662
|
printFileSize: PrintFileSizeOptions | boolean;
|
|
666
663
|
}
|
|
667
664
|
export type SplitChunks = Rspack.OptimizationSplitChunksOptions | false;
|
|
668
|
-
|
|
665
|
+
/**
|
|
666
|
+
* Split chunks preset rules.
|
|
667
|
+
* - `default`: splits polyfills when enabled and applies extra groups when using
|
|
668
|
+
* framework plugins.
|
|
669
|
+
* - `per-package`: splits dependencies in `node_modules` by npm package.
|
|
670
|
+
* - `single-vendor`: splits all `node_modules` dependencies into one vendor chunk.
|
|
671
|
+
* - `none`: disables Rsbuild preset rules.
|
|
672
|
+
*/
|
|
673
|
+
export type SplitChunksPreset = 'default' | 'single-vendor' | 'per-package' | 'none';
|
|
669
674
|
export type SplitChunksConfig = Rspack.OptimizationSplitChunksOptions & {
|
|
670
675
|
preset?: SplitChunksPreset;
|
|
671
676
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@rspack/core": "2.0.0-alpha.1",
|
|
40
|
-
"@rspack/lite-tapable": "~1.1.0",
|
|
41
40
|
"@swc/helpers": "^0.5.18",
|
|
42
41
|
"jiti": "^2.6.1"
|
|
43
42
|
},
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@jridgewell/remapping": "^2.3.5",
|
|
54
53
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
55
|
-
"@rslib/core": "0.19.
|
|
54
|
+
"@rslib/core": "0.19.4",
|
|
56
55
|
"@types/connect": "3.4.38",
|
|
57
56
|
"@types/cors": "^2.8.19",
|
|
58
57
|
"@types/node": "^24.10.9",
|
|
@@ -64,11 +63,11 @@
|
|
|
64
63
|
"chokidar": "^5.0.0",
|
|
65
64
|
"connect": "3.7.0",
|
|
66
65
|
"cors": "^2.8.6",
|
|
67
|
-
"css-loader": "7.1.
|
|
66
|
+
"css-loader": "7.1.3",
|
|
68
67
|
"deepmerge": "^4.3.1",
|
|
69
68
|
"dotenv-expand": "12.0.3",
|
|
70
69
|
"html-rspack-plugin": "6.1.6",
|
|
71
|
-
"http-proxy-middleware": "^
|
|
70
|
+
"http-proxy-middleware": "^3.0.5",
|
|
72
71
|
"launch-editor-middleware": "^2.12.0",
|
|
73
72
|
"memfs": "^4.56.10",
|
|
74
73
|
"mrmime": "^2.0.1",
|