@rsbuild/core 2.3.2 → 2.3.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/sirv.js CHANGED
@@ -5,8 +5,9 @@ import { mrmime_lookup } from "./m.js";
5
5
  import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
6
6
  import * as __rspack_external_node_querystring_5092a520 from "node:querystring";
7
7
  function totalist(dir, callback, pre = '') {
8
- let arr = readdirSync(dir = external_path_resolve('.', dir)), i = 0, abs, stats;
9
- for(; i < arr.length; i++)(stats = statSync(abs = external_path_join(dir, arr[i]))).isDirectory() ? totalist(abs, callback, external_path_join(pre, arr[i])) : callback(external_path_join(pre, arr[i]), abs, stats);
8
+ dir = external_path_resolve('.', dir);
9
+ let arr = readdirSync(dir), i = 0, abs, stats;
10
+ for(; i < arr.length; i++)abs = external_path_join(dir, arr[i]), (stats = statSync(abs)).isDirectory() ? totalist(abs, callback, external_path_join(pre, arr[i])) : callback(external_path_join(pre, arr[i]), abs, stats);
10
11
  }
11
12
  function parse(req) {
12
13
  let raw = req.url;
@@ -1,4 +1,4 @@
1
1
  import loader_transformLoader from "./transformLoader.mjs";
2
- let raw = !0;
3
- export default loader_transformLoader;
2
+ let transformRawLoader = loader_transformLoader, raw = !0;
3
+ export default transformRawLoader;
4
4
  export { raw };
@@ -228,6 +228,13 @@ export type TransformHandler<Raw extends boolean = false> = (context: TransformC
228
228
  * Options that control when and how a transform function runs.
229
229
  */ export type TransformDescriptor = {
230
230
  /**
231
+ * A path template used to match subsequent rules, the same as `rules[].as`.
232
+ * When combined with `order: 'pre'`, the rule matches before the built-in rules
233
+ * so the transformed code can reuse their compilation pipeline.
234
+ * Does not change the execution order or the original resource passed to the handler.
235
+ * @see https://rspack.rs/config/module-rules#rulesas
236
+ */ as?: Rspack.RuleSetRule['as'];
237
+ /**
231
238
  * Include modules that match the test assertion, the same as `rules[].test`
232
239
  * @see https://rspack.rs/config/module-rules#rulestest
233
240
  */ test?: Rspack.RuleSetCondition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "bugs": {
@@ -39,13 +39,13 @@
39
39
  "types.d.ts"
40
40
  ],
41
41
  "dependencies": {
42
- "@rspack/core": "~2.3.2",
42
+ "@rspack/core": "~2.3.3",
43
43
  "@swc/helpers": "^0.5.24"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@jridgewell/remapping": "^2.3.5",
47
47
  "@jridgewell/trace-mapping": "^0.3.31",
48
- "@jsonjoy.com/fs-core": "4.80.0",
48
+ "@jsonjoy.com/fs-core": "4.80.1",
49
49
  "@rstackjs/load-config": "^1.0.2",
50
50
  "@types/cors": "^2.8.19",
51
51
  "@types/node": "^26.6.6",
@@ -65,17 +65,17 @@
65
65
  "http-proxy-middleware": "4.2.1",
66
66
  "jiti": "^2.7.0",
67
67
  "launch-editor-middleware": "^2.14.2",
68
- "memfs": "4.80.0",
68
+ "memfs": "4.80.1",
69
69
  "mrmime": "^2.0.1",
70
70
  "open": "^11.0.4",
71
- "postcss": "^8.5.32",
71
+ "postcss": "^8.5.33",
72
72
  "postcss-load-config": "6.0.1",
73
73
  "postcss-loader": "8.2.1",
74
74
  "prebundle": "1.6.5",
75
75
  "range-parser": "^1.3.0",
76
76
  "reduce-configs": "^2.0.1",
77
77
  "rslog": "^2.3.0",
78
- "rspack-chain": "^2.3.2",
78
+ "rspack-chain": "^2.3.3",
79
79
  "rspack-manifest-plugin": "5.2.2",
80
80
  "rspack-merge": "1.0.1",
81
81
  "sirv": "^3.0.2",