@rsbuild/plugin-babel 0.0.20 → 0.0.22

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/index.js CHANGED
@@ -217,7 +217,7 @@ var pluginBabel = (options = {}) => ({
217
217
  excludes.forEach((condition) => {
218
218
  rule.exclude.add(condition);
219
219
  });
220
- rule.test((0, import_shared2.mergeRegex)(import_shared2.JS_REGEX, import_shared2.TS_REGEX)).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(require.resolve("babel-loader")).options(babelOptions);
220
+ rule.test(import_shared2.SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(require.resolve("babel-loader")).options(babelOptions);
221
221
  });
222
222
  }
223
223
  });
package/dist/index.mjs CHANGED
@@ -15,7 +15,7 @@ import { createRequire } from "module";
15
15
  global.require = createRequire(import.meta.url);
16
16
 
17
17
  // src/plugin.ts
18
- import { JS_REGEX, TS_REGEX, mergeRegex } from "@rsbuild/shared";
18
+ import { SCRIPT_REGEX } from "@rsbuild/shared";
19
19
  import { cloneDeep } from "lodash";
20
20
 
21
21
  // src/helper.ts
@@ -196,7 +196,7 @@ var pluginBabel = (options = {}) => ({
196
196
  excludes.forEach((condition) => {
197
197
  rule.exclude.add(condition);
198
198
  });
199
- rule.test(mergeRegex(JS_REGEX, TS_REGEX)).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(__require.resolve("babel-loader")).options(babelOptions);
199
+ rule.test(SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(__require.resolve("babel-loader")).options(babelOptions);
200
200
  });
201
201
  }
202
202
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-babel",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "Babel plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,14 +27,14 @@
27
27
  "babel-loader": "9.1.3",
28
28
  "lodash": "^4.17.21",
29
29
  "upath": "2.0.1",
30
- "@rsbuild/shared": "0.0.20"
30
+ "@rsbuild/shared": "0.0.22"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/lodash": "^4.14.200",
34
34
  "@types/node": "^16",
35
35
  "typescript": "^5.2.2",
36
- "@rsbuild/test-helper": "0.0.20",
37
- "@rsbuild/core": "0.0.20"
36
+ "@rsbuild/core": "0.0.22",
37
+ "@rsbuild/test-helper": "0.0.22"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public",