@module-federation/rsbuild-plugin 0.14.3 → 0.16.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.
@@ -1 +0,0 @@
1
- export declare const DEFAULT_ASSET_PREFIX = "/";
package/dist/utils.esm.js DELETED
@@ -1,76 +0,0 @@
1
- import util from 'util';
2
-
3
- var DEFAULT_ASSET_PREFIX = '/';
4
-
5
- // lib-polyfill.js: include core-js,@babel/runtime,@swc/helpers,tslib.
6
- // lib-react.js: include react,react-dom.
7
- // lib-router.js: include react-router,react-router-dom,history,@remix-run/router.
8
- // lib-lodash.js: include lodash,lodash-es.
9
- // lib-antd.js: include antd.
10
- // lib-arco.js: include @arco-design/web-react.
11
- // lib-semi.js: include @douyinfe/semi-ui.
12
- // lib-axios.js: include axios.
13
- var SPLIT_CHUNK_MAP = {
14
- REACT: 'react',
15
- ROUTER: 'router',
16
- LODASH: 'lib-lodash',
17
- ANTD: 'lib-antd',
18
- ARCO: 'lib-arco',
19
- SEMI: 'lib-semi',
20
- AXIOS: 'lib-axios'
21
- };
22
- var SHARED_SPLIT_CHUNK_MAP = {
23
- react: SPLIT_CHUNK_MAP.REACT,
24
- 'react-dom': SPLIT_CHUNK_MAP.REACT,
25
- 'react-router': SPLIT_CHUNK_MAP.ROUTER,
26
- 'react-router-dom': SPLIT_CHUNK_MAP.ROUTER,
27
- '@remix-run/router': SPLIT_CHUNK_MAP.ROUTER,
28
- lodash: SPLIT_CHUNK_MAP.LODASH,
29
- 'lodash-es': SPLIT_CHUNK_MAP.LODASH,
30
- antd: SPLIT_CHUNK_MAP.ANTD,
31
- '@arco-design/web-react': SPLIT_CHUNK_MAP.ARCO,
32
- '@douyinfe/semi-ui': SPLIT_CHUNK_MAP.SEMI,
33
- axios: SPLIT_CHUNK_MAP.AXIOS
34
- };
35
- function autoDeleteSplitChunkCacheGroups(mfConfig, splitChunks) {
36
- if (!mfConfig.shared) {
37
- return;
38
- }
39
- if (!splitChunks || !(splitChunks === null || splitChunks === void 0 ? void 0 : splitChunks.cacheGroups)) {
40
- return;
41
- }
42
- var arrayShared = Array.isArray(mfConfig.shared) ? mfConfig.shared : Object.keys(mfConfig.shared);
43
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
44
- try {
45
- for(var _iterator = arrayShared[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
46
- var shared = _step.value;
47
- var splitChunkKey = SHARED_SPLIT_CHUNK_MAP[shared];
48
- if (!splitChunkKey) {
49
- continue;
50
- }
51
- if (splitChunks.cacheGroups[splitChunkKey]) {
52
- delete splitChunks.cacheGroups[splitChunkKey];
53
- }
54
- }
55
- } catch (err) {
56
- _didIteratorError = true;
57
- _iteratorError = err;
58
- } finally{
59
- try {
60
- if (!_iteratorNormalCompletion && _iterator.return != null) {
61
- _iterator.return();
62
- }
63
- } finally{
64
- if (_didIteratorError) {
65
- throw _iteratorError;
66
- }
67
- }
68
- }
69
- return splitChunks;
70
- }
71
-
72
- function isRegExp(target) {
73
- return util.types.isRegExp(target);
74
- }
75
-
76
- export { DEFAULT_ASSET_PREFIX, autoDeleteSplitChunkCacheGroups, isRegExp };