@modern-js/uni-builder 2.49.0 → 2.49.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.
- package/dist/rspack/index.js +1 -5
- package/dist/shared/devServer.js +2 -1
- package/dist/shared/parseCommonConfig.js +5 -1
- package/dist/{rspack → shared}/plugins/manifest.js +1 -1
- package/dist/webpack/index.js +2 -6
- package/package.json +24 -25
- package/dist/webpack/plugins/manifest.d.ts +0 -2
- package/dist/webpack/plugins/manifest.js +0 -54
- /package/dist/{rspack → shared}/plugins/manifest.d.ts +0 -0
package/dist/rspack/index.js
CHANGED
|
@@ -36,12 +36,8 @@ var import_core = require("@rsbuild/core");
|
|
|
36
36
|
var import_parseCommonConfig = require("../shared/parseCommonConfig");
|
|
37
37
|
var import_compatLegacyPlugin = require("../shared/compatLegacyPlugin");
|
|
38
38
|
async function parseConfig(uniBuilderConfig, options) {
|
|
39
|
-
var
|
|
39
|
+
var _uniBuilderConfig_tools, _uniBuilderConfig_tools1;
|
|
40
40
|
const { rsbuildConfig, rsbuildPlugins } = await (0, import_parseCommonConfig.parseCommonConfig)(uniBuilderConfig, options);
|
|
41
|
-
if ((_uniBuilderConfig_output = uniBuilderConfig.output) === null || _uniBuilderConfig_output === void 0 ? void 0 : _uniBuilderConfig_output.enableAssetManifest) {
|
|
42
|
-
const { pluginManifest } = await Promise.resolve().then(() => __toESM(require("./plugins/manifest")));
|
|
43
|
-
rsbuildPlugins.push(pluginManifest());
|
|
44
|
-
}
|
|
45
41
|
if ((_uniBuilderConfig_tools = uniBuilderConfig.tools) === null || _uniBuilderConfig_tools === void 0 ? void 0 : _uniBuilderConfig_tools.babel) {
|
|
46
42
|
var _uniBuilderConfig_tools2;
|
|
47
43
|
const { pluginBabel } = await Promise.resolve().then(() => __toESM(require("@rsbuild/plugin-babel")));
|
package/dist/shared/devServer.js
CHANGED
|
@@ -108,7 +108,7 @@ async function parseCommonConfig(uniBuilderConfig, options) {
|
|
|
108
108
|
var _uniBuilderConfig_output, _uniBuilderConfig_tools;
|
|
109
109
|
var _output, _output_distPath, _output_distPath1, _output1, _extraConfig, _html, _extraConfig1;
|
|
110
110
|
const { cwd, frameworkConfigPath, entry, target } = options;
|
|
111
|
-
const { plugins: [...plugins] = [], performance: { ...performanceConfig } = {}, output: { disableFilenameHash, enableLatestDecorators, cssModuleLocalIdentName, enableInlineScripts, disableCssExtract, enableInlineStyles, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetFallback, disableSourceMap, convertToRem, disableMinimize, polyfill, ...outputConfig } = {}, html: { disableHtmlFolder, metaByEntries, titleByEntries, faviconByEntries, injectByEntries, templateByEntries, templateParametersByEntries, tagsByEntries, tags, ...htmlConfig } = {}, source: { alias, globalVars, resolveMainFields, resolveExtensionPrefix, ...sourceConfig } = {}, dev, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, ...toolsConfig } = {} } = uniBuilderConfig;
|
|
111
|
+
const { plugins: [...plugins] = [], performance: { ...performanceConfig } = {}, output: { disableFilenameHash, enableLatestDecorators, cssModuleLocalIdentName, enableInlineScripts, disableCssExtract, enableInlineStyles, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetFallback, enableAssetManifest, disableSourceMap, convertToRem, disableMinimize, polyfill, ...outputConfig } = {}, html: { disableHtmlFolder, metaByEntries, titleByEntries, faviconByEntries, injectByEntries, templateByEntries, templateParametersByEntries, tagsByEntries, tags, ...htmlConfig } = {}, source: { alias, globalVars, resolveMainFields, resolveExtensionPrefix, ...sourceConfig } = {}, dev, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, ...toolsConfig } = {} } = uniBuilderConfig;
|
|
112
112
|
const rsbuildConfig = {
|
|
113
113
|
plugins,
|
|
114
114
|
output: {
|
|
@@ -322,6 +322,10 @@ async function parseCommonConfig(uniBuilderConfig, options) {
|
|
|
322
322
|
pluginOptions: minifyCss
|
|
323
323
|
}));
|
|
324
324
|
targets.includes("web") && rsbuildPlugins.push((0, import_postcssLegacy.pluginPostcssLegacy)(overrideBrowserslist.web));
|
|
325
|
+
if (enableAssetManifest) {
|
|
326
|
+
const { pluginManifest } = await Promise.resolve().then(() => __toESM(require("./plugins/manifest")));
|
|
327
|
+
rsbuildPlugins.push(pluginManifest());
|
|
328
|
+
}
|
|
325
329
|
return {
|
|
326
330
|
rsbuildConfig: (0, import_core.mergeRsbuildConfig)(rsbuildConfig, extraConfig),
|
|
327
331
|
rsbuildPlugins
|
|
@@ -31,7 +31,7 @@ __export(manifest_exports, {
|
|
|
31
31
|
pluginManifest: () => pluginManifest
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(manifest_exports);
|
|
34
|
-
var import_manifest = require("
|
|
34
|
+
var import_manifest = require("../manifest");
|
|
35
35
|
const pluginManifest = () => ({
|
|
36
36
|
name: "uni-builder:manifest",
|
|
37
37
|
setup(api) {
|
package/dist/webpack/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var import_moduleScopes = require("./plugins/moduleScopes");
|
|
|
39
39
|
var import_babel = require("./plugins/babel");
|
|
40
40
|
var import_react = require("./plugins/react");
|
|
41
41
|
async function parseConfig(uniBuilderConfig, options) {
|
|
42
|
-
var _uniBuilderConfig_tools, _uniBuilderConfig_performance, _uniBuilderConfig_tools1, _uniBuilderConfig_output,
|
|
42
|
+
var _uniBuilderConfig_tools, _uniBuilderConfig_performance, _uniBuilderConfig_tools1, _uniBuilderConfig_output, _uniBuilderConfig_security, _uniBuilderConfig_experiments, _uniBuilderConfig_tools2;
|
|
43
43
|
const { rsbuildConfig, rsbuildPlugins } = await (0, import_parseCommonConfig.parseCommonConfig)(uniBuilderConfig, options);
|
|
44
44
|
var _uniBuilderConfig_performance_transformLodash;
|
|
45
45
|
rsbuildPlugins.push((0, import_babel.pluginBabel)({
|
|
@@ -52,11 +52,7 @@ async function parseConfig(uniBuilderConfig, options) {
|
|
|
52
52
|
const { pluginTsLoader } = await Promise.resolve().then(() => __toESM(require("./plugins/tsLoader")));
|
|
53
53
|
rsbuildPlugins.push(pluginTsLoader(uniBuilderConfig.tools.tsLoader, uniBuilderConfig.tools.babel));
|
|
54
54
|
}
|
|
55
|
-
if ((_uniBuilderConfig_output = uniBuilderConfig.output) === null || _uniBuilderConfig_output === void 0 ? void 0 : _uniBuilderConfig_output.
|
|
56
|
-
const { pluginManifest } = await Promise.resolve().then(() => __toESM(require("./plugins/manifest")));
|
|
57
|
-
rsbuildPlugins.push(pluginManifest());
|
|
58
|
-
}
|
|
59
|
-
if (!((_uniBuilderConfig_output1 = uniBuilderConfig.output) === null || _uniBuilderConfig_output1 === void 0 ? void 0 : _uniBuilderConfig_output1.disableMinimize)) {
|
|
55
|
+
if (!((_uniBuilderConfig_output = uniBuilderConfig.output) === null || _uniBuilderConfig_output === void 0 ? void 0 : _uniBuilderConfig_output.disableMinimize)) {
|
|
60
56
|
var _uniBuilderConfig_tools3;
|
|
61
57
|
const { pluginMinimize } = await Promise.resolve().then(() => __toESM(require("./plugins/minimize")));
|
|
62
58
|
rsbuildPlugins.push(pluginMinimize((_uniBuilderConfig_tools3 = uniBuilderConfig.tools) === null || _uniBuilderConfig_tools3 === void 0 ? void 0 : _uniBuilderConfig_tools3.terser));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/uni-builder",
|
|
3
|
-
"version": "2.49.
|
|
3
|
+
"version": "2.49.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.6.
|
|
30
|
-
"@rsbuild/core": "0.6.
|
|
31
|
-
"@rsbuild/plugin-assets-retry": "0.6.
|
|
32
|
-
"@rsbuild/plugin-babel": "0.6.
|
|
33
|
-
"@rsbuild/plugin-check-syntax": "0.6.
|
|
34
|
-
"@rsbuild/plugin-css-minimizer": "0.6.
|
|
35
|
-
"@rsbuild/plugin-pug": "0.6.
|
|
36
|
-
"@rsbuild/plugin-react": "0.6.
|
|
37
|
-
"@rsbuild/plugin-rem": "0.6.
|
|
38
|
-
"@rsbuild/plugin-source-build": "0.6.
|
|
39
|
-
"@rsbuild/plugin-styled-components": "0.6.
|
|
40
|
-
"@rsbuild/plugin-svgr": "0.6.
|
|
41
|
-
"@rsbuild/plugin-type-check": "0.6.
|
|
42
|
-
"@rsbuild/plugin-toml": "0.6.
|
|
43
|
-
"@rsbuild/plugin-yaml": "0.6.
|
|
44
|
-
"@rsbuild/shared": "0.6.
|
|
45
|
-
"@rsbuild/webpack": "0.6.
|
|
29
|
+
"@rsbuild/babel-preset": "0.6.6",
|
|
30
|
+
"@rsbuild/core": "0.6.6",
|
|
31
|
+
"@rsbuild/plugin-assets-retry": "0.6.6",
|
|
32
|
+
"@rsbuild/plugin-babel": "0.6.6",
|
|
33
|
+
"@rsbuild/plugin-check-syntax": "0.6.6",
|
|
34
|
+
"@rsbuild/plugin-css-minimizer": "0.6.6",
|
|
35
|
+
"@rsbuild/plugin-pug": "0.6.6",
|
|
36
|
+
"@rsbuild/plugin-react": "0.6.6",
|
|
37
|
+
"@rsbuild/plugin-rem": "0.6.6",
|
|
38
|
+
"@rsbuild/plugin-source-build": "0.6.6",
|
|
39
|
+
"@rsbuild/plugin-styled-components": "0.6.6",
|
|
40
|
+
"@rsbuild/plugin-svgr": "0.6.6",
|
|
41
|
+
"@rsbuild/plugin-type-check": "0.6.6",
|
|
42
|
+
"@rsbuild/plugin-toml": "0.6.6",
|
|
43
|
+
"@rsbuild/plugin-yaml": "0.6.6",
|
|
44
|
+
"@rsbuild/shared": "0.6.6",
|
|
45
|
+
"@rsbuild/webpack": "0.6.6",
|
|
46
46
|
"@swc/helpers": "0.5.3",
|
|
47
47
|
"babel-loader": "9.1.3",
|
|
48
48
|
"babel-plugin-import": "1.13.5",
|
|
@@ -65,20 +65,19 @@
|
|
|
65
65
|
"terser-webpack-plugin": "5.3.10",
|
|
66
66
|
"ts-loader": "9.4.4",
|
|
67
67
|
"webpack": "^5.91.0",
|
|
68
|
-
"webpack-manifest-plugin": "5.0.0",
|
|
69
68
|
"webpack-subresource-integrity": "5.1.0",
|
|
70
|
-
"@modern-js/utils": "2.49.
|
|
71
|
-
"@modern-js/server": "2.49.
|
|
69
|
+
"@modern-js/utils": "2.49.1",
|
|
70
|
+
"@modern-js/server": "2.49.1"
|
|
72
71
|
},
|
|
73
72
|
"devDependencies": {
|
|
74
|
-
"@rsbuild/plugin-swc": "0.6.
|
|
73
|
+
"@rsbuild/plugin-swc": "0.6.6",
|
|
75
74
|
"@types/lodash": "^4.14.202",
|
|
76
75
|
"react": "^18.2.0",
|
|
77
76
|
"react-dom": "^18.2.0",
|
|
78
77
|
"typescript": "^5.3.0",
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"@scripts/
|
|
78
|
+
"@modern-js/prod-server": "2.49.1",
|
|
79
|
+
"@scripts/build": "2.49.1",
|
|
80
|
+
"@scripts/vitest-config": "2.49.1"
|
|
82
81
|
},
|
|
83
82
|
"publishConfig": {
|
|
84
83
|
"access": "public",
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var manifest_exports = {};
|
|
30
|
-
__export(manifest_exports, {
|
|
31
|
-
pluginManifest: () => pluginManifest
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(manifest_exports);
|
|
34
|
-
var import_manifest = require("../../shared/manifest");
|
|
35
|
-
const pluginManifest = () => ({
|
|
36
|
-
name: "uni-builder:manifest",
|
|
37
|
-
setup(api) {
|
|
38
|
-
api.modifyBundlerChain(async (chain, { target, CHAIN_ID }) => {
|
|
39
|
-
const { WebpackManifestPlugin } = await Promise.resolve().then(() => __toESM(require("webpack-manifest-plugin")));
|
|
40
|
-
const publicPath = chain.output.get("publicPath");
|
|
41
|
-
chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(WebpackManifestPlugin, [
|
|
42
|
-
{
|
|
43
|
-
fileName: target === "web" ? "asset-manifest.json" : `asset-manifest-${target}.json`,
|
|
44
|
-
publicPath,
|
|
45
|
-
generate: import_manifest.generateManifest
|
|
46
|
-
}
|
|
47
|
-
]);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 && (module.exports = {
|
|
53
|
-
pluginManifest
|
|
54
|
-
});
|
|
File without changes
|