@rsbuild/plugin-babel 0.3.5 → 0.3.7

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.d.ts CHANGED
@@ -61,8 +61,18 @@ type BabelConfigUtils = {
61
61
  addExcludes: (excludes: RuleCondition) => void;
62
62
  };
63
63
  type PluginBabelOptions = {
64
+ /**
65
+ * Used to specify the files that need to be compiled by Babel.
66
+ */
64
67
  include?: RuleCondition;
68
+ /**
69
+ * Used to specify the files that do not need to be compiled by Babel.
70
+ */
65
71
  exclude?: RuleCondition;
72
+ /**
73
+ * Options passed to `babel-loader`.
74
+ * @see https://github.com/babel/babel-loader
75
+ */
66
76
  babelLoaderOptions?: ChainedConfigWithUtils<TransformOptions, BabelConfigUtils>;
67
77
  };
68
78
 
package/dist/index.js CHANGED
@@ -39,19 +39,19 @@ __export(src_exports, {
39
39
  module.exports = __toCommonJS(src_exports);
40
40
 
41
41
  // src/plugin.ts
42
- var import_path2 = __toESM(require("path"));
42
+ var import_node_path2 = __toESM(require("path"));
43
43
  var import_core = require("@rsbuild/core");
44
44
  var import_shared2 = require("@rsbuild/shared");
45
45
 
46
46
  // src/helper.ts
47
- var import_path = require("path");
47
+ var import_node_path = require("path");
48
48
  var import_shared = require("@rsbuild/shared");
49
49
  var import_upath = __toESM(require("upath"));
50
50
  var BABEL_JS_RULE = "babel-js";
51
- var normalizeToPosixPath = (p) => import_upath.default.normalizeSafe((0, import_path.normalize)(p || "")).replace(/^([a-zA-Z]+):/, (_, m) => `/${m.toLowerCase()}`);
51
+ var normalizeToPosixPath = (p) => import_upath.default.normalizeSafe((0, import_node_path.normalize)(p || "")).replace(/^([a-zA-Z]+):/, (_, m) => `/${m.toLowerCase()}`);
52
52
  var formatPath = (originPath) => {
53
- if ((0, import_path.isAbsolute)(originPath)) {
54
- return originPath.split(import_path.sep).join("/");
53
+ if ((0, import_node_path.isAbsolute)(originPath)) {
54
+ return originPath.split(import_node_path.sep).join("/");
55
55
  }
56
56
  return originPath;
57
57
  };
@@ -211,7 +211,7 @@ var pluginBabel = (options = {}) => ({
211
211
  return userBabelConfig;
212
212
  };
213
213
  const babelOptions = getBabelOptions();
214
- const babelLoader = import_path2.default.resolve(
214
+ const babelLoader = import_node_path2.default.resolve(
215
215
  __dirname,
216
216
  "../compiled/babel-loader/index.js"
217
217
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-babel",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "Babel plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,16 +27,16 @@
27
27
  "@babel/preset-typescript": "^7.23.2",
28
28
  "@types/babel__core": "^7.20.3",
29
29
  "upath": "2.0.1",
30
- "@rsbuild/shared": "0.3.5"
30
+ "@rsbuild/shared": "0.3.7"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "16.x",
34
34
  "typescript": "^5.3.0",
35
- "@rsbuild/core": "0.3.5",
36
- "@scripts/test-helper": "0.3.5"
35
+ "@rsbuild/core": "0.3.7",
36
+ "@scripts/test-helper": "0.3.7"
37
37
  },
38
38
  "peerDependencies": {
39
- "@rsbuild/core": "^0.3.5"
39
+ "@rsbuild/core": "^0.3.7"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public",