@rsbuild/plugin-babel 1.0.1 → 1.0.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/index.js CHANGED
@@ -1,268 +1,205 @@
1
- import { createRequire } from 'module';
2
- var require = createRequire(import.meta['url']);
3
-
4
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
- }) : x)(function(x) {
7
- if (typeof require !== "undefined")
8
- return require.apply(this, arguments);
9
- throw Error('Dynamic require of "' + x + '" is not supported');
10
- });
11
-
12
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.59.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js
13
- import path from "path";
14
- import { fileURLToPath } from "url";
15
- var getFilename = () => fileURLToPath(import.meta.url);
16
- var getDirname = () => path.dirname(getFilename());
17
- var __dirname = /* @__PURE__ */ getDirname();
18
-
19
- // src/plugin.ts
20
- import fs from "fs";
21
- import path2, { isAbsolute as isAbsolute2, join } from "path";
22
- import deepmerge from "deepmerge";
23
-
24
- // src/helper.ts
25
- import { isAbsolute, normalize, sep } from "path";
26
- import { reduceConfigsWithContext } from "reduce-configs";
27
- import upath from "upath";
28
- var BABEL_JS_RULE = "babel-js";
29
- var castArray = (arr) => {
30
- if (arr === void 0) {
31
- return [];
32
- }
33
- return Array.isArray(arr) ? arr : [arr];
1
+ import * as __WEBPACK_EXTERNAL_MODULE_node_fs__ from "node:fs";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_node_module__ from "node:module";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_node_path__ from "node:path";
4
+ import * as __WEBPACK_EXTERNAL_MODULE_node_url__ from "node:url";
5
+ import * as __WEBPACK_EXTERNAL_MODULE_deepmerge__ from "deepmerge";
6
+ import * as __WEBPACK_EXTERNAL_MODULE_reduce_configs__ from "reduce-configs";
7
+ import * as __WEBPACK_EXTERNAL_MODULE_upath__ from "upath";
8
+ const BABEL_JS_RULE = 'babel-js';
9
+ const castArray = (arr)=>{
10
+ if (void 0 === arr) return [];
11
+ return Array.isArray(arr) ? arr : [
12
+ arr
13
+ ];
34
14
  };
35
- var normalizeToPosixPath = (p) => upath.normalizeSafe(normalize(p || "")).replace(/^([a-zA-Z]+):/, (_, m) => `/${m.toLowerCase()}`);
36
- var formatPath = (originPath) => {
37
- if (isAbsolute(originPath)) {
38
- return originPath.split(sep).join("/");
39
- }
40
- return originPath;
15
+ const normalizeToPosixPath = (p)=>__WEBPACK_EXTERNAL_MODULE_upath__["default"].normalizeSafe((0, __WEBPACK_EXTERNAL_MODULE_node_path__.normalize)(p || '')).replace(/^([a-zA-Z]+):/, (_, m)=>`/${m.toLowerCase()}`);
16
+ // compatible with Windows path
17
+ const formatPath = (originPath)=>{
18
+ if ((0, __WEBPACK_EXTERNAL_MODULE_node_path__.isAbsolute)(originPath)) return originPath.split(__WEBPACK_EXTERNAL_MODULE_node_path__.sep).join('/');
19
+ return originPath;
41
20
  };
42
- var getPluginItemName = (item) => {
43
- if (typeof item === "string") {
44
- return formatPath(item);
45
- }
46
- if (Array.isArray(item) && typeof item[0] === "string") {
47
- return formatPath(item[0]);
48
- }
49
- return null;
21
+ const getPluginItemName = (item)=>{
22
+ if ('string' == typeof item) return formatPath(item);
23
+ if (Array.isArray(item) && 'string' == typeof item[0]) return formatPath(item[0]);
24
+ return null;
50
25
  };
51
- var addPlugins = (plugins, config) => {
52
- if (config.plugins) {
53
- config.plugins.push(...plugins);
54
- } else {
55
- config.plugins = plugins;
56
- }
26
+ const addPlugins = (plugins, config)=>{
27
+ if (config.plugins) config.plugins.push(...plugins);
28
+ else config.plugins = plugins;
57
29
  };
58
- var addPresets = (presets, config) => {
59
- if (config.presets) {
60
- config.presets.push(...presets);
61
- } else {
62
- config.presets = presets;
63
- }
30
+ const addPresets = (presets, config)=>{
31
+ if (config.presets) config.presets.push(...presets);
32
+ else config.presets = presets;
64
33
  };
65
- var removePlugins = (plugins, config) => {
66
- if (!config.plugins) {
67
- return;
68
- }
69
- const removeList = castArray(plugins);
70
- config.plugins = config.plugins.filter((item) => {
71
- const name = getPluginItemName(item);
72
- if (name) {
73
- return !removeList.find((removeItem) => name.includes(removeItem));
74
- }
75
- return true;
76
- });
77
- };
78
- var removePresets = (presets, config) => {
79
- if (!config.presets) {
80
- return;
81
- }
82
- const removeList = castArray(presets);
83
- config.presets = config.presets.filter((item) => {
84
- const name = getPluginItemName(item);
85
- if (name) {
86
- return !removeList.find((removeItem) => name.includes(removeItem));
87
- }
88
- return true;
89
- });
34
+ const removePlugins = (plugins, config)=>{
35
+ if (!config.plugins) return;
36
+ const removeList = castArray(plugins);
37
+ config.plugins = config.plugins.filter((item)=>{
38
+ const name = getPluginItemName(item);
39
+ if (name) return !removeList.find((removeItem)=>name.includes(removeItem));
40
+ return true;
41
+ });
90
42
  };
91
- var modifyPresetOptions = (presetName, options, presets = []) => {
92
- presets.forEach((preset, index) => {
93
- if (Array.isArray(preset)) {
94
- if (typeof preset[0] === "string" && normalizeToPosixPath(preset[0]).includes(presetName)) {
95
- preset[1] = {
96
- ...preset[1] || {},
97
- ...options
98
- // `options` is specific to different presets
99
- };
100
- }
101
- } else if (typeof preset === "string" && normalizeToPosixPath(preset).includes(presetName)) {
102
- presets[index] = [preset, options];
103
- }
104
- });
43
+ const removePresets = (presets, config)=>{
44
+ if (!config.presets) return;
45
+ const removeList = castArray(presets);
46
+ config.presets = config.presets.filter((item)=>{
47
+ const name = getPluginItemName(item);
48
+ if (name) return !removeList.find((removeItem)=>name.includes(removeItem));
49
+ return true;
50
+ });
105
51
  };
106
- var getBabelUtils = (config) => {
107
- const noop = () => {
108
- };
109
- return {
110
- addPlugins: (plugins) => addPlugins(plugins, config),
111
- addPresets: (presets) => addPresets(presets, config),
112
- removePlugins: (plugins) => removePlugins(plugins, config),
113
- removePresets: (presets) => removePresets(presets, config),
114
- // `addIncludes` and `addExcludes` are noop functions by default,
115
- // It can be overridden by `extraBabelUtils`.
116
- addIncludes: noop,
117
- addExcludes: noop,
118
- // Compat `presetEnvOptions` and `presetReactOptions` in Modern.js
119
- modifyPresetEnvOptions: (options) => modifyPresetOptions("@babel/preset-env", options, config.presets || []),
120
- modifyPresetReactOptions: (options) => modifyPresetOptions("@babel/preset-react", options, config.presets || [])
121
- };
52
+ const modifyPresetOptions = (presetName, options, presets = [])=>{
53
+ presets.forEach((preset, index)=>{
54
+ // 1. ['@babel/preset-env', ...]
55
+ if (Array.isArray(preset)) {
56
+ if ('string' == typeof preset[0] && normalizeToPosixPath(preset[0]).includes(presetName)) preset[1] = {
57
+ ...preset[1] || {},
58
+ ...options
59
+ };
60
+ } else if ('string' == typeof preset && normalizeToPosixPath(preset).includes(presetName)) // 2. '@babel/preset-env'
61
+ presets[index] = [
62
+ preset,
63
+ options
64
+ ];
65
+ });
122
66
  };
123
- var applyUserBabelConfig = (defaultOptions, userBabelConfig, extraBabelUtils) => {
124
- if (userBabelConfig) {
125
- const babelUtils = {
126
- ...getBabelUtils(defaultOptions),
127
- ...extraBabelUtils
67
+ const getBabelUtils = (config)=>{
68
+ const noop = ()=>{};
69
+ return {
70
+ addPlugins: (plugins)=>addPlugins(plugins, config),
71
+ addPresets: (presets)=>addPresets(presets, config),
72
+ removePlugins: (plugins)=>removePlugins(plugins, config),
73
+ removePresets: (presets)=>removePresets(presets, config),
74
+ // `addIncludes` and `addExcludes` are noop functions by default,
75
+ // It can be overridden by `extraBabelUtils`.
76
+ addIncludes: noop,
77
+ addExcludes: noop,
78
+ // Compat `presetEnvOptions` and `presetReactOptions` in Modern.js
79
+ modifyPresetEnvOptions: (options)=>modifyPresetOptions('@babel/preset-env', options, config.presets || []),
80
+ modifyPresetReactOptions: (options)=>modifyPresetOptions('@babel/preset-react', options, config.presets || [])
128
81
  };
129
- return reduceConfigsWithContext({
130
- initial: defaultOptions,
131
- config: userBabelConfig,
132
- ctx: babelUtils
133
- });
134
- }
135
- return defaultOptions;
136
82
  };
137
- var modifyBabelLoaderOptions = ({
138
- chain,
139
- CHAIN_ID,
140
- modifier
141
- }) => {
142
- const ruleIds = [CHAIN_ID.RULE.JS, CHAIN_ID.RULE.JS_DATA_URI, BABEL_JS_RULE];
143
- for (const ruleId of ruleIds) {
144
- if (chain.module.rules.has(ruleId)) {
145
- const rule = chain.module.rule(ruleId);
146
- if (rule.uses.has(CHAIN_ID.USE.BABEL)) {
147
- rule.use(CHAIN_ID.USE.BABEL).tap(modifier);
148
- }
83
+ const applyUserBabelConfig = (defaultOptions, userBabelConfig, extraBabelUtils)=>{
84
+ if (userBabelConfig) {
85
+ const babelUtils = {
86
+ ...getBabelUtils(defaultOptions),
87
+ ...extraBabelUtils
88
+ };
89
+ return (0, __WEBPACK_EXTERNAL_MODULE_reduce_configs__.reduceConfigsWithContext)({
90
+ initial: defaultOptions,
91
+ config: userBabelConfig,
92
+ ctx: babelUtils
93
+ });
94
+ }
95
+ return defaultOptions;
96
+ };
97
+ const modifyBabelLoaderOptions = ({ chain, CHAIN_ID, modifier })=>{
98
+ const ruleIds = [
99
+ CHAIN_ID.RULE.JS,
100
+ CHAIN_ID.RULE.JS_DATA_URI,
101
+ BABEL_JS_RULE
102
+ ];
103
+ for (const ruleId of ruleIds)if (chain.module.rules.has(ruleId)) {
104
+ const rule = chain.module.rule(ruleId);
105
+ if (rule.uses.has(CHAIN_ID.USE.BABEL)) rule.use(CHAIN_ID.USE.BABEL).tap(modifier);
149
106
  }
150
- }
151
107
  };
152
-
153
- // src/plugin.ts
154
- var PLUGIN_BABEL_NAME = "rsbuild:babel";
155
- var SCRIPT_REGEX = /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/;
156
- var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
157
- allowNamespaces: true,
158
- allExtensions: true,
159
- allowDeclareFields: true,
160
- // aligns Babel's behavior with TypeScript's default behavior.
161
- // https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums
162
- optimizeConstEnums: true,
163
- isTSX: true
108
+ const plugin_dirname = __WEBPACK_EXTERNAL_MODULE_node_path__["default"].dirname((0, __WEBPACK_EXTERNAL_MODULE_node_url__.fileURLToPath)(import.meta.url));
109
+ const plugin_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module__.createRequire)(import.meta.url);
110
+ const PLUGIN_BABEL_NAME = 'rsbuild:babel';
111
+ const SCRIPT_REGEX = /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/;
112
+ /**
113
+ * The `@babel/preset-typescript` default options.
114
+ */ const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
115
+ allowNamespaces: true,
116
+ allExtensions: true,
117
+ allowDeclareFields: true,
118
+ // aligns Babel's behavior with TypeScript's default behavior.
119
+ // https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums
120
+ optimizeConstEnums: true,
121
+ isTSX: true
164
122
  };
165
123
  function getCacheDirectory(context, cacheDirectory) {
166
- if (cacheDirectory) {
167
- return isAbsolute2(cacheDirectory) ? cacheDirectory : join(context.rootPath, cacheDirectory);
168
- }
169
- return join(context.cachePath);
124
+ if (cacheDirectory) return (0, __WEBPACK_EXTERNAL_MODULE_node_path__.isAbsolute)(cacheDirectory) ? cacheDirectory : (0, __WEBPACK_EXTERNAL_MODULE_node_path__.join)(context.rootPath, cacheDirectory);
125
+ return (0, __WEBPACK_EXTERNAL_MODULE_node_path__.join)(context.cachePath);
170
126
  }
171
127
  async function getCacheIdentifier(options) {
172
- let identifier = `${process.env.NODE_ENV}${JSON.stringify(options)}`;
173
- const { version: coreVersion } = await import("@babel/core");
174
- const rawPkgJson = await fs.promises.readFile(
175
- join(__dirname, "../compiled/babel-loader/package.json"),
176
- "utf-8"
177
- );
178
- const loaderVersion = JSON.parse(rawPkgJson).version ?? "";
179
- identifier += `@babel/core@${coreVersion}`;
180
- identifier += `babel-loader@${loaderVersion}`;
181
- return identifier;
128
+ let identifier = `${process.env.NODE_ENV}${JSON.stringify(options)}`;
129
+ const { version: coreVersion } = await import("@babel/core");
130
+ const rawPkgJson = await __WEBPACK_EXTERNAL_MODULE_node_fs__["default"].promises.readFile((0, __WEBPACK_EXTERNAL_MODULE_node_path__.join)(plugin_dirname, '../compiled/babel-loader/package.json'), 'utf-8');
131
+ const loaderVersion = JSON.parse(rawPkgJson).version ?? '';
132
+ identifier += `@babel/core@${coreVersion}`;
133
+ identifier += `babel-loader@${loaderVersion}`;
134
+ return identifier;
182
135
  }
183
- var getDefaultBabelOptions = (config, context) => {
184
- const isLegacyDecorators = config.source.decorators.version === "legacy";
185
- const options = {
186
- babelrc: false,
187
- configFile: false,
188
- compact: config.mode === "production",
189
- plugins: [
190
- [
191
- __require.resolve("@babel/plugin-proposal-decorators"),
192
- config.source.decorators
193
- ],
194
- // If you are using @babel/preset-env and legacy decorators, you must ensure the class elements transform is enabled regardless of your targets, because Babel only supports compiling legacy decorators when also compiling class properties:
195
- // see https://babeljs.io/docs/babel-plugin-proposal-decorators#legacy
196
- ...isLegacyDecorators ? [__require.resolve("@babel/plugin-transform-class-properties")] : []
197
- ],
198
- presets: [
199
- // TODO: only apply preset-typescript for ts file (isTSX & allExtensions false)
200
- [
201
- __require.resolve("@babel/preset-typescript"),
202
- DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS
203
- ]
204
- ]
205
- };
206
- const { buildCache } = config.performance;
207
- if (buildCache && context.bundlerType === "rspack") {
208
- const cacheDirectory = getCacheDirectory(
209
- context,
210
- typeof buildCache === "boolean" ? void 0 : buildCache.cacheDirectory
211
- );
212
- options.cacheCompression = false;
213
- options.cacheDirectory = join(cacheDirectory, "babel-loader");
214
- }
215
- return options;
216
- };
217
- var pluginBabel = (options = {}) => ({
218
- name: PLUGIN_BABEL_NAME,
219
- setup(api) {
220
- const getBabelOptions = async (environment) => {
221
- const { config } = environment;
222
- const baseOptions = getDefaultBabelOptions(config, api.context);
223
- const mergedOptions = applyUserBabelConfig(
224
- deepmerge({}, baseOptions),
225
- options.babelLoaderOptions
226
- );
227
- if (mergedOptions.cacheDirectory && !mergedOptions.cacheIdentifier) {
228
- mergedOptions.cacheIdentifier = await getCacheIdentifier(mergedOptions);
229
- }
230
- return mergedOptions;
136
+ const getDefaultBabelOptions = (config, context)=>{
137
+ const isLegacyDecorators = 'legacy' === config.source.decorators.version;
138
+ const options = {
139
+ babelrc: false,
140
+ configFile: false,
141
+ compact: 'production' === config.mode,
142
+ plugins: [
143
+ [
144
+ plugin_require.resolve('@babel/plugin-proposal-decorators'),
145
+ config.source.decorators
146
+ ],
147
+ // If you are using @babel/preset-env and legacy decorators, you must ensure the class elements transform is enabled regardless of your targets, because Babel only supports compiling legacy decorators when also compiling class properties:
148
+ // see https://babeljs.io/docs/babel-plugin-proposal-decorators#legacy
149
+ ...isLegacyDecorators ? [
150
+ plugin_require.resolve('@babel/plugin-transform-class-properties')
151
+ ] : []
152
+ ],
153
+ presets: [
154
+ // TODO: only apply preset-typescript for ts file (isTSX & allExtensions false)
155
+ [
156
+ plugin_require.resolve('@babel/preset-typescript'),
157
+ DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS
158
+ ]
159
+ ]
231
160
  };
232
- api.modifyBundlerChain({
233
- order: "pre",
234
- handler: async (chain, { CHAIN_ID, environment }) => {
235
- const babelOptions = await getBabelOptions(environment);
236
- const babelLoader = path2.resolve(
237
- __dirname,
238
- "../compiled/babel-loader/index.js"
239
- );
240
- const { include, exclude } = options;
241
- if (include || exclude) {
242
- const rule = chain.module.rule(BABEL_JS_RULE).after(CHAIN_ID.RULE.JS);
243
- if (include) {
244
- for (const condition of castArray(include)) {
245
- rule.include.add(condition);
246
- }
247
- }
248
- if (exclude) {
249
- for (const condition of castArray(exclude)) {
250
- rule.exclude.add(condition);
251
- }
252
- }
253
- rule.test(SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).loader(babelLoader).options(babelOptions);
254
- } else {
255
- const rule = chain.module.rule(CHAIN_ID.RULE.JS);
256
- rule.test(SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(babelLoader).options(babelOptions);
161
+ const { buildCache } = config.performance;
162
+ // Rspack does not yet support persistent cache
163
+ // so we use babel-loader's cache to improve rebuild performance
164
+ if (buildCache && 'rspack' === context.bundlerType) {
165
+ const cacheDirectory = getCacheDirectory(context, 'boolean' == typeof buildCache ? void 0 : buildCache.cacheDirectory);
166
+ // turn off compression to reduce overhead
167
+ options.cacheCompression = false;
168
+ options.cacheDirectory = (0, __WEBPACK_EXTERNAL_MODULE_node_path__.join)(cacheDirectory, 'babel-loader');
169
+ }
170
+ return options;
171
+ };
172
+ const pluginBabel = (options = {})=>({
173
+ name: PLUGIN_BABEL_NAME,
174
+ setup (api) {
175
+ const getBabelOptions = async (environment)=>{
176
+ const { config } = environment;
177
+ const baseOptions = getDefaultBabelOptions(config, api.context);
178
+ const mergedOptions = applyUserBabelConfig((0, __WEBPACK_EXTERNAL_MODULE_deepmerge__["default"])({}, baseOptions), options.babelLoaderOptions);
179
+ // calculate cacheIdentifier with the merged options
180
+ if (mergedOptions.cacheDirectory && !mergedOptions.cacheIdentifier) mergedOptions.cacheIdentifier = await getCacheIdentifier(mergedOptions);
181
+ return mergedOptions;
182
+ };
183
+ api.modifyBundlerChain({
184
+ order: 'pre',
185
+ handler: async (chain, { CHAIN_ID, environment })=>{
186
+ const babelOptions = await getBabelOptions(environment);
187
+ const babelLoader = __WEBPACK_EXTERNAL_MODULE_node_path__["default"].resolve(plugin_dirname, '../compiled/babel-loader/index.js');
188
+ const { include, exclude } = options;
189
+ if (include || exclude) {
190
+ const rule = chain.module.rule(BABEL_JS_RULE) // run babel loader before the builtin SWC loader
191
+ // https://stackoverflow.com/questions/32234329/what-is-the-loader-order-for-webpack
192
+ .after(CHAIN_ID.RULE.JS);
193
+ if (include) for (const condition of castArray(include))rule.include.add(condition);
194
+ if (exclude) for (const condition of castArray(exclude))rule.exclude.add(condition);
195
+ rule.test(SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).loader(babelLoader).options(babelOptions);
196
+ } else {
197
+ // already set source.include / exclude in plugin-swc
198
+ const rule = chain.module.rule(CHAIN_ID.RULE.JS);
199
+ rule.test(SCRIPT_REGEX).use(CHAIN_ID.USE.BABEL).after(CHAIN_ID.USE.SWC).loader(babelLoader).options(babelOptions);
200
+ }
201
+ }
202
+ });
257
203
  }
258
- }
259
204
  });
260
- }
261
- });
262
- export {
263
- PLUGIN_BABEL_NAME,
264
- getBabelUtils,
265
- getDefaultBabelOptions,
266
- modifyBabelLoaderOptions,
267
- pluginBabel
268
- };
205
+ export { PLUGIN_BABEL_NAME, getBabelUtils, getDefaultBabelOptions, modifyBabelLoaderOptions, pluginBabel };
@@ -1,5 +1,5 @@
1
1
  import type { NormalizedEnvironmentConfig, RsbuildContext, RsbuildPlugin } from '@rsbuild/core';
2
- import type { BabelLoaderOptions, PluginBabelOptions } from './types';
2
+ import type { BabelLoaderOptions, PluginBabelOptions } from './types.js';
3
3
  export declare const PLUGIN_BABEL_NAME = "rsbuild:babel";
4
4
  /**
5
5
  * The `@babel/preset-typescript` default options.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-babel",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Babel plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,23 +11,22 @@
11
11
  "type": "module",
12
12
  "exports": {
13
13
  ".": {
14
- "types": "./dist-types/index.d.ts",
14
+ "types": "./dist/index.d.ts",
15
15
  "import": "./dist/index.js",
16
16
  "require": "./dist/index.cjs"
17
17
  }
18
18
  },
19
19
  "main": "./dist/index.cjs",
20
- "types": "./dist-types/index.d.ts",
20
+ "types": "./dist/index.d.ts",
21
21
  "files": [
22
22
  "dist",
23
- "compiled",
24
- "dist-types"
23
+ "compiled"
25
24
  ],
26
25
  "dependencies": {
27
- "@babel/core": "^7.25.2",
28
- "@babel/plugin-proposal-decorators": "^7.24.7",
29
- "@babel/plugin-transform-class-properties": "^7.25.4",
30
- "@babel/preset-typescript": "^7.24.7",
26
+ "@babel/core": "^7.26.0",
27
+ "@babel/plugin-proposal-decorators": "^7.25.9",
28
+ "@babel/plugin-transform-class-properties": "^7.25.9",
29
+ "@babel/preset-typescript": "^7.26.0",
31
30
  "@types/babel__core": "^7.20.5",
32
31
  "deepmerge": "^4.3.1",
33
32
  "reduce-configs": "^1.0.0",
@@ -35,14 +34,14 @@
35
34
  },
36
35
  "devDependencies": {
37
36
  "@types/node": "18.x",
38
- "babel-loader": "9.1.3",
37
+ "babel-loader": "9.2.1",
39
38
  "prebundle": "1.2.2",
40
- "typescript": "^5.5.2",
41
- "@rsbuild/core": "1.0.1",
39
+ "typescript": "^5.6.3",
40
+ "@rsbuild/core": "1.0.19",
42
41
  "@scripts/test-helper": "1.0.1"
43
42
  },
44
43
  "peerDependencies": {
45
- "@rsbuild/core": "1.x || ^1.0.1-rc.0"
44
+ "@rsbuild/core": "1.x"
46
45
  },
47
46
  "publishConfig": {
48
47
  "access": "public",
@@ -50,8 +49,8 @@
50
49
  "registry": "https://registry.npmjs.org/"
51
50
  },
52
51
  "scripts": {
53
- "build": "modern build",
54
- "dev": "modern build --watch",
52
+ "build": "rslib build",
53
+ "dev": "rslib build --watch",
55
54
  "prebundle": "prebundle"
56
55
  }
57
56
  }
@@ -1 +0,0 @@
1
- {"//":"This file is for making TypeScript work with moduleResolution node16+.","version":"1.0.0"}
File without changes