@rsbuild/plugin-babel 0.2.16 → 0.2.17

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
@@ -66,6 +66,19 @@ type PluginBabelOptions = {
66
66
  babelLoaderOptions?: ChainedConfigWithUtils<TransformOptions, BabelConfigUtils>;
67
67
  };
68
68
 
69
+ declare const getDefaultBabelOptions: () => {
70
+ babelrc: boolean;
71
+ configFile: boolean;
72
+ compact: boolean;
73
+ plugins: never[];
74
+ presets: (string | {
75
+ allowNamespaces: boolean;
76
+ allExtensions: boolean;
77
+ allowDeclareFields: boolean;
78
+ optimizeConstEnums: boolean;
79
+ isTSX: boolean;
80
+ })[][];
81
+ };
69
82
  declare const pluginBabel: (options?: PluginBabelOptions) => RsbuildPlugin;
70
83
 
71
84
  declare const getBabelUtils: (config: TransformOptions) => BabelConfigUtils;
@@ -76,4 +89,4 @@ declare const modifyBabelLoaderOptions: ({ chain, CHAIN_ID, modifier, }: {
76
89
  modifier: (config: TransformOptions) => TransformOptions;
77
90
  }) => void;
78
91
 
79
- export { BabelConfigUtils, PluginBabelOptions, PresetEnvBuiltIns, PresetEnvOptions, PresetEnvTargets, getBabelUtils, getUseBuiltIns, modifyBabelLoaderOptions, pluginBabel };
92
+ export { BabelConfigUtils, PluginBabelOptions, PresetEnvBuiltIns, PresetEnvOptions, PresetEnvTargets, getBabelUtils, getDefaultBabelOptions, getUseBuiltIns, modifyBabelLoaderOptions, pluginBabel };
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  getBabelUtils: () => getBabelUtils,
34
+ getDefaultBabelOptions: () => getDefaultBabelOptions,
34
35
  getUseBuiltIns: () => getUseBuiltIns,
35
36
  modifyBabelLoaderOptions: () => modifyBabelLoaderOptions,
36
37
  pluginBabel: () => pluginBabel
@@ -240,6 +241,7 @@ var pluginBabel = (options = {}) => ({
240
241
  // Annotate the CommonJS export names for ESM import in node:
241
242
  0 && (module.exports = {
242
243
  getBabelUtils,
244
+ getDefaultBabelOptions,
243
245
  getUseBuiltIns,
244
246
  modifyBabelLoaderOptions,
245
247
  pluginBabel
package/dist/index.mjs CHANGED
@@ -222,6 +222,7 @@ var pluginBabel = (options = {}) => ({
222
222
  });
223
223
  export {
224
224
  getBabelUtils,
225
+ getDefaultBabelOptions,
225
226
  getUseBuiltIns,
226
227
  modifyBabelLoaderOptions,
227
228
  pluginBabel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-babel",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Babel plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,13 +27,13 @@
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.2.16"
30
+ "@rsbuild/shared": "0.2.17"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "16.x",
34
34
  "typescript": "^5.3.0",
35
- "@rsbuild/test-helper": "0.2.16",
36
- "@rsbuild/core": "0.2.16"
35
+ "@rsbuild/core": "0.2.17",
36
+ "@rsbuild/test-helper": "0.2.17"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public",