@modern-js/uni-builder 2.48.0 → 2.48.1
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.
|
@@ -39,7 +39,7 @@ const pluginBabelPost = () => ({
|
|
|
39
39
|
api.modifyBundlerChain({
|
|
40
40
|
handler: async (chain, { CHAIN_ID }) => {
|
|
41
41
|
if (chain.module.rules.get(CHAIN_ID.RULE.JS)) {
|
|
42
|
-
const babelLoaderOptions = chain.module.rule(CHAIN_ID.RULE.JS).use(CHAIN_ID.USE.BABEL).get("options");
|
|
42
|
+
const { cacheIdentifier, ...babelLoaderOptions } = chain.module.rule(CHAIN_ID.RULE.JS).use(CHAIN_ID.USE.BABEL).get("options");
|
|
43
43
|
const config = api.getNormalizedConfig();
|
|
44
44
|
if (babelLoaderOptions && (0, import_isEqual.default)((0, import_plugin_babel.getDefaultBabelOptions)(config, api.context), babelLoaderOptions)) {
|
|
45
45
|
chain.module.rule(CHAIN_ID.RULE.JS).uses.delete(CHAIN_ID.USE.BABEL);
|
|
@@ -193,7 +193,10 @@ async function parseCommonConfig(uniBuilderConfig, options) {
|
|
|
193
193
|
extraConfig.html.template = ({ entryName }) => templateByEntries[entryName];
|
|
194
194
|
}
|
|
195
195
|
if (templateParametersByEntries) {
|
|
196
|
-
extraConfig.html.templateParameters = (
|
|
196
|
+
extraConfig.html.templateParameters = (defaultValue, { entryName }) => ({
|
|
197
|
+
...defaultValue,
|
|
198
|
+
...templateParametersByEntries[entryName] || {}
|
|
199
|
+
});
|
|
197
200
|
}
|
|
198
201
|
var _tools;
|
|
199
202
|
(_tools = (_extraConfig1 = extraConfig).tools) !== null && _tools !== void 0 ? _tools : _extraConfig1.tools = {};
|
|
@@ -50,13 +50,17 @@ const pluginPostcssLegacy = (webBrowserslist) => ({
|
|
|
50
50
|
]
|
|
51
51
|
}) : false
|
|
52
52
|
].filter(Boolean);
|
|
53
|
-
return mergeRsbuildConfig(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
opts
|
|
53
|
+
return mergeRsbuildConfig(
|
|
54
|
+
{
|
|
55
|
+
tools: {
|
|
56
|
+
postcss: (opts) => {
|
|
57
|
+
opts.postcssOptions.plugins.push(...plugins);
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
+
},
|
|
61
|
+
// user config has higher priority than builtin config
|
|
62
|
+
config
|
|
63
|
+
);
|
|
60
64
|
});
|
|
61
65
|
}
|
|
62
66
|
});
|
|
@@ -61,8 +61,8 @@ const pluginSplitChunks = () => ({
|
|
|
61
61
|
// rspack chunks type mismatch with webpack
|
|
62
62
|
// @ts-expect-error
|
|
63
63
|
cacheGroups: {
|
|
64
|
-
...
|
|
65
|
-
...
|
|
64
|
+
...(0, import_shared.createCacheGroups)(groups),
|
|
65
|
+
...currentConfig.cacheGroups
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
});
|
|
@@ -21,7 +21,6 @@ __export(ModuleScopePlugin_exports, {
|
|
|
21
21
|
ModuleScopePlugin: () => ModuleScopePlugin
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(ModuleScopePlugin_exports);
|
|
24
|
-
var import_define_property = require("@swc/helpers/_/_define_property");
|
|
25
24
|
var import_path = require("path");
|
|
26
25
|
var import_shared = require("@rsbuild/shared");
|
|
27
26
|
class ModuleScopePlugin {
|
|
@@ -78,12 +77,6 @@ class ModuleScopePlugin {
|
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
79
|
constructor({ scopes, allowedFiles = [] }) {
|
|
81
|
-
(0, import_define_property._)(this, "scopes", void 0);
|
|
82
|
-
(0, import_define_property._)(this, "allowedFiles", void 0);
|
|
83
|
-
(0, import_define_property._)(this, "allowedDirs", void 0);
|
|
84
|
-
(0, import_define_property._)(this, "allowedPatterns", void 0);
|
|
85
|
-
(0, import_define_property._)(this, "relativeAllowedDirs", void 0);
|
|
86
|
-
(0, import_define_property._)(this, "cache", void 0);
|
|
87
80
|
this.scopes = scopes;
|
|
88
81
|
this.allowedFiles = new Set(allowedFiles);
|
|
89
82
|
this.allowedDirs = scopes.filter(import_shared.isString);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/uni-builder",
|
|
3
|
-
"version": "2.48.
|
|
3
|
+
"version": "2.48.1",
|
|
4
4
|
"description": "Unified builder for Modern.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
"@babel/preset-react": "^7.22.15",
|
|
27
27
|
"@babel/types": "^7.23.0",
|
|
28
28
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
|
29
|
-
"@rsbuild/babel-preset": "0.4.
|
|
30
|
-
"@rsbuild/core": "0.4.
|
|
31
|
-
"@rsbuild/plugin-assets-retry": "0.4.
|
|
32
|
-
"@rsbuild/plugin-babel": "0.4.
|
|
33
|
-
"@rsbuild/plugin-check-syntax": "0.4.
|
|
34
|
-
"@rsbuild/plugin-css-minimizer": "0.4.
|
|
35
|
-
"@rsbuild/plugin-pug": "0.4.
|
|
36
|
-
"@rsbuild/plugin-react": "0.4.
|
|
37
|
-
"@rsbuild/plugin-rem": "0.4.
|
|
38
|
-
"@rsbuild/plugin-source-build": "0.4.
|
|
39
|
-
"@rsbuild/plugin-styled-components": "0.4.
|
|
40
|
-
"@rsbuild/plugin-svgr": "0.4.
|
|
41
|
-
"@rsbuild/plugin-type-check": "0.4.
|
|
42
|
-
"@rsbuild/plugin-toml": "0.4.
|
|
43
|
-
"@rsbuild/plugin-yaml": "0.4.
|
|
44
|
-
"@rsbuild/shared": "0.4.
|
|
45
|
-
"@rsbuild/webpack": "0.4.
|
|
29
|
+
"@rsbuild/babel-preset": "0.4.15",
|
|
30
|
+
"@rsbuild/core": "0.4.15",
|
|
31
|
+
"@rsbuild/plugin-assets-retry": "0.4.15",
|
|
32
|
+
"@rsbuild/plugin-babel": "0.4.15",
|
|
33
|
+
"@rsbuild/plugin-check-syntax": "0.4.15",
|
|
34
|
+
"@rsbuild/plugin-css-minimizer": "0.4.15",
|
|
35
|
+
"@rsbuild/plugin-pug": "0.4.15",
|
|
36
|
+
"@rsbuild/plugin-react": "0.4.15",
|
|
37
|
+
"@rsbuild/plugin-rem": "0.4.15",
|
|
38
|
+
"@rsbuild/plugin-source-build": "0.4.15",
|
|
39
|
+
"@rsbuild/plugin-styled-components": "0.4.15",
|
|
40
|
+
"@rsbuild/plugin-svgr": "0.4.15",
|
|
41
|
+
"@rsbuild/plugin-type-check": "0.4.15",
|
|
42
|
+
"@rsbuild/plugin-toml": "0.4.15",
|
|
43
|
+
"@rsbuild/plugin-yaml": "0.4.15",
|
|
44
|
+
"@rsbuild/shared": "0.4.15",
|
|
45
|
+
"@rsbuild/webpack": "0.4.15",
|
|
46
46
|
"@swc/helpers": "0.5.3",
|
|
47
47
|
"babel-loader": "9.1.3",
|
|
48
48
|
"babel-plugin-import": "1.13.5",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"glob": "^9.3.5",
|
|
53
53
|
"html-webpack-plugin": "5.5.3",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
55
|
+
"postcss": "^8.4.35",
|
|
55
56
|
"postcss-custom-properties": "13.1.5",
|
|
56
57
|
"postcss-flexbugs-fixes": "5.0.2",
|
|
57
58
|
"postcss-font-variant": "5.0.0",
|
|
@@ -65,18 +66,18 @@
|
|
|
65
66
|
"webpack": "^5.89.0",
|
|
66
67
|
"webpack-manifest-plugin": "5.0.0",
|
|
67
68
|
"webpack-subresource-integrity": "5.1.0",
|
|
68
|
-
"@modern-js/utils": "2.48.
|
|
69
|
-
"@modern-js/
|
|
70
|
-
"@modern-js/server": "2.48.0"
|
|
69
|
+
"@modern-js/utils": "2.48.1",
|
|
70
|
+
"@modern-js/server": "2.48.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@rsbuild/plugin-swc": "0.4.
|
|
73
|
+
"@rsbuild/plugin-swc": "0.4.15",
|
|
74
74
|
"@types/lodash": "^4.14.202",
|
|
75
75
|
"react": "^18.2.0",
|
|
76
76
|
"react-dom": "^18.2.0",
|
|
77
77
|
"typescript": "^5.3.0",
|
|
78
|
-
"@
|
|
79
|
-
"@scripts/
|
|
78
|
+
"@modern-js/prod-server": "2.48.1",
|
|
79
|
+
"@scripts/build": "2.48.1",
|
|
80
|
+
"@scripts/vitest-config": "2.48.1"
|
|
80
81
|
},
|
|
81
82
|
"publishConfig": {
|
|
82
83
|
"access": "public",
|