@rsbuild/plugin-babel 1.0.0-alpha.6 → 1.0.0-alpha.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/helper.d.ts +1 -2
- package/dist/index.cjs +0 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -8
- package/package.json +4 -4
package/dist/helper.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { ChainIdentifier,
|
|
1
|
+
import type { ChainIdentifier, 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 castArray: <T>(arr?: T | T[]) => T[];
|
|
5
5
|
export declare const getBabelUtils: (config: BabelTransformOptions) => BabelConfigUtils;
|
|
6
6
|
export declare const applyUserBabelConfig: (defaultOptions: BabelLoaderOptions, userBabelConfig?: PluginBabelOptions["babelLoaderOptions"], extraBabelUtils?: Partial<BabelConfigUtils>) => BabelLoaderOptions;
|
|
7
|
-
export declare const getUseBuiltIns: (config: NormalizedConfig) => false | "usage" | "entry";
|
|
8
7
|
export declare const modifyBabelLoaderOptions: ({ chain, CHAIN_ID, modifier, }: {
|
|
9
8
|
chain: RspackChain;
|
|
10
9
|
CHAIN_ID: ChainIdentifier;
|
package/dist/index.cjs
CHANGED
|
@@ -33,7 +33,6 @@ __export(src_exports, {
|
|
|
33
33
|
PLUGIN_BABEL_NAME: () => PLUGIN_BABEL_NAME,
|
|
34
34
|
getBabelUtils: () => getBabelUtils,
|
|
35
35
|
getDefaultBabelOptions: () => getDefaultBabelOptions,
|
|
36
|
-
getUseBuiltIns: () => getUseBuiltIns,
|
|
37
36
|
modifyBabelLoaderOptions: () => modifyBabelLoaderOptions,
|
|
38
37
|
pluginBabel: () => pluginBabel
|
|
39
38
|
});
|
|
@@ -157,13 +156,6 @@ var applyUserBabelConfig = (defaultOptions, userBabelConfig, extraBabelUtils) =>
|
|
|
157
156
|
}
|
|
158
157
|
return defaultOptions;
|
|
159
158
|
};
|
|
160
|
-
var getUseBuiltIns = (config) => {
|
|
161
|
-
const { polyfill } = config.output;
|
|
162
|
-
if (polyfill === "off") {
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
return polyfill;
|
|
166
|
-
};
|
|
167
159
|
var modifyBabelLoaderOptions = ({
|
|
168
160
|
chain,
|
|
169
161
|
CHAIN_ID,
|
|
@@ -294,7 +286,6 @@ var pluginBabel = (options = {}) => ({
|
|
|
294
286
|
PLUGIN_BABEL_NAME,
|
|
295
287
|
getBabelUtils,
|
|
296
288
|
getDefaultBabelOptions,
|
|
297
|
-
getUseBuiltIns,
|
|
298
289
|
modifyBabelLoaderOptions,
|
|
299
290
|
pluginBabel
|
|
300
291
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { pluginBabel, getDefaultBabelOptions, PLUGIN_BABEL_NAME, } from './plugin';
|
|
2
|
-
export { getBabelUtils,
|
|
2
|
+
export { getBabelUtils, modifyBabelLoaderOptions } from './helper';
|
|
3
3
|
export type { PresetEnvOptions, PresetEnvTargets, PresetEnvBuiltIns, BabelConfigUtils, BabelTransformOptions, PluginBabelOptions, } from './types';
|
package/dist/index.js
CHANGED
|
@@ -134,13 +134,6 @@ var applyUserBabelConfig = (defaultOptions, userBabelConfig, extraBabelUtils) =>
|
|
|
134
134
|
}
|
|
135
135
|
return defaultOptions;
|
|
136
136
|
};
|
|
137
|
-
var getUseBuiltIns = (config) => {
|
|
138
|
-
const { polyfill } = config.output;
|
|
139
|
-
if (polyfill === "off") {
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
return polyfill;
|
|
143
|
-
};
|
|
144
137
|
var modifyBabelLoaderOptions = ({
|
|
145
138
|
chain,
|
|
146
139
|
CHAIN_ID,
|
|
@@ -270,7 +263,6 @@ export {
|
|
|
270
263
|
PLUGIN_BABEL_NAME,
|
|
271
264
|
getBabelUtils,
|
|
272
265
|
getDefaultBabelOptions,
|
|
273
|
-
getUseBuiltIns,
|
|
274
266
|
modifyBabelLoaderOptions,
|
|
275
267
|
pluginBabel
|
|
276
268
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-babel",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.7",
|
|
4
4
|
"description": "Babel plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"babel-loader": "9.1.3",
|
|
38
38
|
"prebundle": "1.1.0",
|
|
39
39
|
"typescript": "^5.5.2",
|
|
40
|
-
"@rsbuild/core": "1.0.0-alpha.
|
|
41
|
-
"@scripts/test-helper": "1.0.0-alpha.
|
|
40
|
+
"@rsbuild/core": "1.0.0-alpha.7",
|
|
41
|
+
"@scripts/test-helper": "1.0.0-alpha.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@rsbuild/core": "^1.0.0-alpha.
|
|
44
|
+
"@rsbuild/core": "^1.0.0-alpha.7"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public",
|