@winner-fed/bundler-rsbuild 0.19.4-alpha.0 → 1.0.0-rc.0
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/_virtual/_rolldown/runtime.js +40 -0
- package/dist/build.d.ts +13 -14
- package/dist/build.js +72 -120
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +57 -87
- package/dist/config/config.d.ts +27 -17
- package/dist/config/config.js +96 -145
- package/dist/config/devConfig.d.ts +3 -11
- package/dist/config/devConfig.js +8 -34
- package/dist/config/outConfig.d.ts +6 -7
- package/dist/config/outConfig.js +57 -106
- package/dist/config/performanceConfig.d.ts +9 -17
- package/dist/config/performanceConfig.js +18 -46
- package/dist/config/resolveConfig.d.ts +3 -11
- package/dist/config/resolveConfig.js +4 -32
- package/dist/config/serverConfig.d.ts +9 -17
- package/dist/config/serverConfig.js +22 -54
- package/dist/config/sourceConfig.d.ts +11 -12
- package/dist/config/sourceConfig.js +79 -154
- package/dist/config/toolsConfig.d.ts +10 -18
- package/dist/config/toolsConfig.js +36 -74
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +13 -44
- package/dist/dev.d.ts +23 -24
- package/dist/dev.js +32 -76
- package/dist/index.d.ts +6 -5
- package/dist/index.js +13 -29
- package/dist/requireHook.d.ts +1 -3
- package/dist/requireHook.js +27 -11
- package/dist/schema.d.ts +2 -2
- package/dist/schema.js +80 -195
- package/dist/server/compilerAdapter.d.ts +16 -0
- package/dist/server/compilerAdapter.js +7 -0
- package/dist/server/server.d.ts +13 -14
- package/dist/server/server.js +57 -107
- package/dist/types.d.ts +66 -73
- package/dist/types.js +19 -47
- package/dist/utils/checkConfig.js +13 -61
- package/dist/utils/getBrowsersList.d.ts +1 -2
- package/dist/utils/getBrowsersList.js +7 -36
- package/package.json +6 -5
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esmMin = (fn, res, err) => () => {
|
|
8
|
+
if (err) throw err[0];
|
|
9
|
+
try {
|
|
10
|
+
return fn && (res = fn(fn = 0)), res;
|
|
11
|
+
} catch (e) {
|
|
12
|
+
throw err = [e], e;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var __exportAll = (all, no_symbols) => {
|
|
16
|
+
let target = {};
|
|
17
|
+
for (var name in all) __defProp(target, name, {
|
|
18
|
+
get: all[name],
|
|
19
|
+
enumerable: true
|
|
20
|
+
});
|
|
21
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
22
|
+
return target;
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
26
|
+
key = keys[i];
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
28
|
+
get: ((k) => from[k]).bind(null, key),
|
|
29
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return to;
|
|
33
|
+
};
|
|
34
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
35
|
+
value: mod,
|
|
36
|
+
enumerable: true
|
|
37
|
+
}) : target, mod));
|
|
38
|
+
exports.__esmMin = __esmMin;
|
|
39
|
+
exports.__exportAll = __exportAll;
|
|
40
|
+
exports.__toESM = __toESM;
|
package/dist/build.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { IConfig, MultiStats, Stats } from
|
|
1
|
+
import { IConfig, MultiStats, Stats } from "./types.js";
|
|
2
2
|
type IOpts = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
cwd: string;
|
|
4
|
+
rootDir?: string;
|
|
5
|
+
entry: Record<string, string>;
|
|
6
|
+
config: IConfig;
|
|
7
|
+
onBuildComplete?: (opts: {
|
|
8
|
+
err?: Error | null;
|
|
9
|
+
stats?: Stats | MultiStats | any;
|
|
10
|
+
isFirstCompile?: boolean;
|
|
11
|
+
time?: number;
|
|
12
|
+
}) => Promise<void>;
|
|
13
|
+
clean?: boolean;
|
|
14
|
+
watch?: boolean;
|
|
15
15
|
};
|
|
16
16
|
export declare function build(opts: IOpts): Promise<any>;
|
|
17
|
-
export {};
|
package/dist/build.js
CHANGED
|
@@ -1,122 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/build.ts
|
|
30
|
-
var build_exports = {};
|
|
31
|
-
__export(build_exports, {
|
|
32
|
-
build: () => build
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(build_exports);
|
|
35
|
-
var import_core = require("@rsbuild/core");
|
|
36
|
-
var import_utils = require("@winner-fed/utils");
|
|
37
|
-
var import_assert = __toESM(require("assert"));
|
|
38
|
-
var import_types = require("./types");
|
|
39
|
-
var import_checkConfig = require("./utils/checkConfig");
|
|
40
|
-
var configModule = (0, import_utils.importLazy)(
|
|
41
|
-
require.resolve("./config/config")
|
|
42
|
-
);
|
|
43
|
-
var statsJson = {};
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.js");
|
|
3
|
+
require("./types.js");
|
|
4
|
+
const require_utils_checkConfig = require("./utils/checkConfig.js");
|
|
5
|
+
let _rsbuild_core = require("@rsbuild/core");
|
|
6
|
+
let _winner_fed_utils = require("@winner-fed/utils");
|
|
7
|
+
let assert = require("assert");
|
|
8
|
+
assert = require_runtime.__toESM(assert);
|
|
9
|
+
const configModule = (0, _winner_fed_utils.importLazy)(require.resolve("./config/config"));
|
|
10
|
+
let statsJson = {};
|
|
44
11
|
async function build(opts) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
writeToDisk: true
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
const stats = makeStats();
|
|
110
|
-
if (onBuildComplete) {
|
|
111
|
-
await onBuildComplete({
|
|
112
|
-
err: null,
|
|
113
|
-
stats,
|
|
114
|
-
isFirstCompile: true
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
return stats;
|
|
12
|
+
var _opts$config, _opts$config2, _opts$watch;
|
|
13
|
+
(0, assert.default)(opts, "opts should be supplied");
|
|
14
|
+
require_utils_checkConfig.checkConfig(opts);
|
|
15
|
+
const { cwd, onBuildComplete, config } = opts;
|
|
16
|
+
const rsbuildConfig = await configModule.getRsbuildConfig({
|
|
17
|
+
userConfig: opts.config,
|
|
18
|
+
env: "production",
|
|
19
|
+
extraBabelIncludes: (_opts$config = opts.config) === null || _opts$config === void 0 ? void 0 : _opts$config.extraBabelIncludes,
|
|
20
|
+
extraBabelExcludes: (_opts$config2 = opts.config) === null || _opts$config2 === void 0 ? void 0 : _opts$config2.extraBabelExcludes,
|
|
21
|
+
...opts
|
|
22
|
+
});
|
|
23
|
+
const rsbuild = await (0, _rsbuild_core.createRsbuild)({
|
|
24
|
+
cwd,
|
|
25
|
+
rsbuildConfig
|
|
26
|
+
});
|
|
27
|
+
const isWatch = (_opts$watch = opts.watch) !== null && _opts$watch !== void 0 ? _opts$watch : false;
|
|
28
|
+
let isFirstCompile = true;
|
|
29
|
+
const makeStats = () => {
|
|
30
|
+
var _statsJson$assets;
|
|
31
|
+
return {
|
|
32
|
+
compilation: {
|
|
33
|
+
...statsJson,
|
|
34
|
+
assets: statsJson === null || statsJson === void 0 || (_statsJson$assets = statsJson.assets) === null || _statsJson$assets === void 0 ? void 0 : _statsJson$assets.reduce((acc, asset) => ({
|
|
35
|
+
...acc,
|
|
36
|
+
[asset.name]: { size: asset.size }
|
|
37
|
+
}), {})
|
|
38
|
+
},
|
|
39
|
+
hasErrors: () => false
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
try {
|
|
43
|
+
rsbuild.onAfterBuild((params) => {
|
|
44
|
+
var _params$stats, _params$stats2;
|
|
45
|
+
const s = ((_params$stats = params.stats) === null || _params$stats === void 0 ? void 0 : _params$stats.stats) ? (_params$stats2 = params.stats) === null || _params$stats2 === void 0 || (_params$stats2 = _params$stats2.stats) === null || _params$stats2 === void 0 ? void 0 : _params$stats2[0] : params.stats;
|
|
46
|
+
statsJson = s === null || s === void 0 ? void 0 : s.toJson();
|
|
47
|
+
if (isWatch && !isFirstCompile && onBuildComplete) onBuildComplete({
|
|
48
|
+
err: null,
|
|
49
|
+
stats: makeStats(),
|
|
50
|
+
isFirstCompile: false
|
|
51
|
+
});
|
|
52
|
+
isFirstCompile = false;
|
|
53
|
+
});
|
|
54
|
+
await rsbuild.build({ watch: isWatch });
|
|
55
|
+
} catch (e) {
|
|
56
|
+
console.error(e === null || e === void 0 ? void 0 : e.message);
|
|
57
|
+
throw new Error("Build with rsbuild failed.");
|
|
58
|
+
}
|
|
59
|
+
const { inspectConfig } = config;
|
|
60
|
+
if (inspectConfig) await rsbuild.inspectConfig({
|
|
61
|
+
mode: "production",
|
|
62
|
+
verbose: inspectConfig.verbose || false,
|
|
63
|
+
outputPath: inspectConfig.outputPath,
|
|
64
|
+
writeToDisk: true
|
|
65
|
+
});
|
|
66
|
+
const stats = makeStats();
|
|
67
|
+
if (onBuildComplete) await onBuildComplete({
|
|
68
|
+
err: null,
|
|
69
|
+
stats,
|
|
70
|
+
isFirstCompile: true
|
|
71
|
+
});
|
|
72
|
+
return stats;
|
|
118
73
|
}
|
|
119
|
-
|
|
120
|
-
0 && (module.exports = {
|
|
121
|
-
build
|
|
122
|
-
});
|
|
74
|
+
exports.build = build;
|
package/dist/cli.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {}
|
package/dist/cli.js
CHANGED
|
@@ -1,93 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
-
mod
|
|
22
|
-
));
|
|
23
|
-
|
|
24
|
-
// src/cli.ts
|
|
25
|
-
var import_esbuild = __toESM(require("@winner-fed/bundler-utils/compiled/esbuild"));
|
|
26
|
-
var import_utils = require("@winner-fed/utils");
|
|
27
|
-
var import_assert = __toESM(require("assert"));
|
|
28
|
-
var import_fs = require("fs");
|
|
29
|
-
var import_path = require("path");
|
|
30
|
-
var import_build = require("./build");
|
|
31
|
-
var import_dev = require("./dev");
|
|
32
|
-
var args = (0, import_utils.yParser)(process.argv.slice(2), {});
|
|
33
|
-
var command = args._[0];
|
|
34
|
-
var cwd = process.cwd();
|
|
35
|
-
var entry = (0, import_utils.tryPaths)([
|
|
36
|
-
(0, import_path.join)(cwd, "src/index.tsx"),
|
|
37
|
-
(0, import_path.join)(cwd, "src/index.ts"),
|
|
38
|
-
(0, import_path.join)(cwd, "index.tsx"),
|
|
39
|
-
(0, import_path.join)(cwd, "index.ts")
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.js");
|
|
2
|
+
const require_build = require("./build.js");
|
|
3
|
+
const require_dev = require("./dev.js");
|
|
4
|
+
const require_requireHook = require("./requireHook.js");
|
|
5
|
+
let _winner_fed_utils = require("@winner-fed/utils");
|
|
6
|
+
let assert = require("assert");
|
|
7
|
+
assert = require_runtime.__toESM(assert);
|
|
8
|
+
let _winner_fed_bundler_utils_compiled_esbuild = require("@winner-fed/bundler-utils/compiled/esbuild");
|
|
9
|
+
_winner_fed_bundler_utils_compiled_esbuild = require_runtime.__toESM(_winner_fed_bundler_utils_compiled_esbuild);
|
|
10
|
+
let fs = require("fs");
|
|
11
|
+
let path = require("path");
|
|
12
|
+
const args = (0, _winner_fed_utils.yParser)(process.argv.slice(2), {});
|
|
13
|
+
const command = args._[0];
|
|
14
|
+
const cwd = process.cwd();
|
|
15
|
+
const entry = (0, _winner_fed_utils.tryPaths)([
|
|
16
|
+
(0, path.join)(cwd, "src/index.tsx"),
|
|
17
|
+
(0, path.join)(cwd, "src/index.ts"),
|
|
18
|
+
(0, path.join)(cwd, "index.tsx"),
|
|
19
|
+
(0, path.join)(cwd, "index.ts")
|
|
40
20
|
]);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
require("./requireHook");
|
|
49
|
-
config = require(configFile).default;
|
|
21
|
+
let config = {};
|
|
22
|
+
const configFile = (0, path.join)(cwd, args.config || "config.ts");
|
|
23
|
+
_winner_fed_utils.register.register({ implementor: _winner_fed_bundler_utils_compiled_esbuild.default });
|
|
24
|
+
_winner_fed_utils.register.clearFiles();
|
|
25
|
+
if ((0, fs.existsSync)(configFile)) {
|
|
26
|
+
require_requireHook.init_requireHook();
|
|
27
|
+
config = require(configFile).default;
|
|
50
28
|
}
|
|
51
29
|
Object.assign(config, args);
|
|
52
|
-
if (command === "build") {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
81
|
-
} catch (e) {
|
|
82
|
-
console.error(e);
|
|
83
|
-
}
|
|
84
|
-
})();
|
|
85
|
-
} else {
|
|
86
|
-
error(`Unsupported command ${command}.`);
|
|
87
|
-
}
|
|
30
|
+
if (command === "build") (async () => {
|
|
31
|
+
process.env.NODE_ENV = "production";
|
|
32
|
+
(0, assert.default)(entry, `Build failed: entry not found.`);
|
|
33
|
+
try {
|
|
34
|
+
await require_build.build({
|
|
35
|
+
config,
|
|
36
|
+
cwd,
|
|
37
|
+
entry: { [getEntryKey(entry)]: entry }
|
|
38
|
+
});
|
|
39
|
+
} catch (e) {
|
|
40
|
+
console.error(e);
|
|
41
|
+
}
|
|
42
|
+
})();
|
|
43
|
+
else if (command === "dev") (async () => {
|
|
44
|
+
process.env.NODE_ENV = "development";
|
|
45
|
+
try {
|
|
46
|
+
(0, assert.default)(entry, `Build failed: entry not found.`);
|
|
47
|
+
await require_dev.dev({
|
|
48
|
+
config,
|
|
49
|
+
cwd,
|
|
50
|
+
port: process.env.PORT,
|
|
51
|
+
entry: { [getEntryKey(entry)]: entry }
|
|
52
|
+
});
|
|
53
|
+
} catch (e) {
|
|
54
|
+
console.error(e);
|
|
55
|
+
}
|
|
56
|
+
})();
|
|
57
|
+
else error(`Unsupported command ${command}.`);
|
|
88
58
|
function error(msg) {
|
|
89
|
-
|
|
59
|
+
console.error(_winner_fed_utils.chalk.red(msg));
|
|
90
60
|
}
|
|
91
|
-
function getEntryKey(path) {
|
|
92
|
-
|
|
61
|
+
function getEntryKey(path$1) {
|
|
62
|
+
return (0, path.basename)(path$1, (0, path.extname)(path$1));
|
|
93
63
|
}
|
package/dist/config/config.d.ts
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { Env, IBabelPlugin, IConfig } from "../types.js";
|
|
2
|
+
import { RsbuildConfig, rspack } from "@rsbuild/core";
|
|
3
|
+
import { MaybePromise } from "@rsbuild/core/dist-types/types";
|
|
4
4
|
export interface IOpts {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
cwd: string;
|
|
6
|
+
env: Env;
|
|
7
|
+
entry: Record<string, string>;
|
|
8
|
+
modifyRsbuildConfig?: {
|
|
9
|
+
(memo: RsbuildConfig, args: {
|
|
10
|
+
env: Env;
|
|
11
|
+
rspack: typeof rspack;
|
|
12
|
+
}): MaybePromise<RsbuildConfig>;
|
|
13
|
+
};
|
|
14
|
+
userConfig: IConfig;
|
|
15
|
+
beforeBabelPlugins?: IBabelPlugin[];
|
|
16
|
+
extraBabelPlugins?: IBabelPlugin[];
|
|
17
|
+
extraBabelIncludes?: Array<string | RegExp>;
|
|
18
|
+
extraBabelExcludes?: Array<string | RegExp>;
|
|
19
|
+
beforeBabelPresets?: IBabelPlugin[];
|
|
20
|
+
extraBabelPresets?: IBabelPlugin[];
|
|
19
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* 聚合传入 bundler 的 babel 插件/preset(getBabelOpts 已把用户配置与
|
|
24
|
+
* addExtraBabel* 钩子合并进 opts.extraBabel*,此处只做排序与 falsy 过滤)
|
|
25
|
+
*/
|
|
26
|
+
export declare function collectBabelExtras(opts: IOpts): {
|
|
27
|
+
plugins: IBabelPlugin[];
|
|
28
|
+
presets: IBabelPlugin[];
|
|
29
|
+
};
|
|
20
30
|
export declare function getRsbuildConfig(opts: IOpts): Promise<RsbuildConfig>;
|