@rsbuild/plugin-babel 1.0.0-alpha.0 → 1.0.0-alpha.2

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/helper.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ChainIdentifier, type NormalizedConfig, type RspackChain } from '@rsbuild/core';
1
+ import type { ChainIdentifier, NormalizedConfig, RspackChain } from '@rsbuild/core';
2
2
  import type { BabelConfigUtils, BabelLoaderOptions, BabelTransformOptions, PluginBabelOptions } from './types';
3
3
  export declare const BABEL_JS_RULE = "babel-js";
4
4
  export declare const getBabelUtils: (config: BabelTransformOptions) => BabelConfigUtils;
package/dist/index.cjs CHANGED
@@ -46,8 +46,8 @@ var import_shared2 = require("@rsbuild/shared");
46
46
 
47
47
  // src/helper.ts
48
48
  var import_node_path = require("path");
49
- var import_core = require("@rsbuild/core");
50
49
  var import_shared = require("@rsbuild/shared");
50
+ var import_reduce_configs = require("reduce-configs");
51
51
  var import_upath = __toESM(require("upath"));
52
52
  var BABEL_JS_RULE = "babel-js";
53
53
  var normalizeToPosixPath = (p) => import_upath.default.normalizeSafe((0, import_node_path.normalize)(p || "")).replace(/^([a-zA-Z]+):/, (_, m) => `/${m.toLowerCase()}`);
@@ -144,7 +144,7 @@ var applyUserBabelConfig = (defaultOptions, userBabelConfig, extraBabelUtils) =>
144
144
  ...getBabelUtils(defaultOptions),
145
145
  ...extraBabelUtils
146
146
  };
147
- return (0, import_core.reduceConfigsWithContext)({
147
+ return (0, import_reduce_configs.reduceConfigsWithContext)({
148
148
  initial: defaultOptions,
149
149
  config: userBabelConfig,
150
150
  ctx: babelUtils
package/dist/index.js CHANGED
@@ -23,10 +23,8 @@ import { SCRIPT_REGEX, castArray as castArray2, cloneDeep } from "@rsbuild/share
23
23
 
24
24
  // src/helper.ts
25
25
  import { isAbsolute, normalize, sep } from "path";
26
- import {
27
- reduceConfigsWithContext
28
- } from "@rsbuild/core";
29
26
  import { castArray } from "@rsbuild/shared";
27
+ import { reduceConfigsWithContext } from "reduce-configs";
30
28
  import upath from "upath";
31
29
  var BABEL_JS_RULE = "babel-js";
32
30
  var normalizeToPosixPath = (p) => upath.normalizeSafe(normalize(p || "")).replace(/^([a-zA-Z]+):/, (_, m) => `/${m.toLowerCase()}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-babel",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.2",
4
4
  "description": "Babel plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,19 +28,20 @@
28
28
  "@babel/plugin-transform-class-properties": "^7.24.7",
29
29
  "@babel/preset-typescript": "^7.24.7",
30
30
  "@types/babel__core": "^7.20.5",
31
+ "reduce-configs": "^1.0.0",
31
32
  "upath": "2.0.1",
32
- "@rsbuild/shared": "1.0.0-alpha.0"
33
+ "@rsbuild/shared": "1.0.0-alpha.2"
33
34
  },
34
35
  "devDependencies": {
35
36
  "@types/node": "18.x",
36
37
  "babel-loader": "9.1.3",
37
38
  "prebundle": "1.1.0",
38
39
  "typescript": "^5.5.2",
39
- "@rsbuild/core": "1.0.0-alpha.0",
40
- "@scripts/test-helper": "1.0.0-alpha.0"
40
+ "@rsbuild/core": "1.0.0-alpha.2",
41
+ "@scripts/test-helper": "1.0.0-alpha.2"
41
42
  },
42
43
  "peerDependencies": {
43
- "@rsbuild/core": "^1.0.0-alpha.0"
44
+ "@rsbuild/core": "^1.0.0-alpha.2"
44
45
  },
45
46
  "publishConfig": {
46
47
  "access": "public",