@modern-js/uni-builder 2.58.1 → 2.58.2
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/plugins/babel-post.d.ts +1 -1
- package/dist/shared/devServer.d.ts +1 -1
- package/dist/shared/parseCommonConfig.js +9 -1
- package/dist/shared/plugins/antd.d.ts +1 -1
- package/dist/shared/plugins/arco.d.ts +1 -1
- package/dist/shared/plugins/devtools.d.ts +1 -1
- package/dist/shared/plugins/emitRouteFile.d.ts +1 -1
- package/dist/types.d.ts +3 -2
- package/dist/webpack/plugins/babel.d.ts +1 -1
- package/dist/webpack/plugins/minimize.d.ts +2 -2
- package/dist/webpack/plugins/tsLoader.d.ts +1 -1
- package/package.json +15 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DevConfig, ServerConfig } from '@rsbuild/core';
|
|
2
2
|
import type { UniBuilderConfig, ToolsDevServerConfig } from '../types';
|
|
3
3
|
export declare const transformToRsbuildServerOptions: (dev: NonNullable<UniBuilderConfig['dev']>, devServer: ToolsDevServerConfig) => {
|
|
4
4
|
dev: DevConfig;
|
|
@@ -82,7 +82,7 @@ async function parseCommonConfig(uniBuilderConfig, options) {
|
|
|
82
82
|
var _uniBuilderConfig_output, _uniBuilderConfig_tools;
|
|
83
83
|
var _rsbuildConfig_tools, _output_distPath, _output, _extraConfig, _html, _extraConfig1;
|
|
84
84
|
const { frameworkConfigPath } = options;
|
|
85
|
-
const { plugins: [...plugins] = [], performance: { ...performanceConfig } = {}, output: { disableFilenameHash, enableLatestDecorators, cssModuleLocalIdentName, enableInlineScripts, disableCssExtract, enableInlineStyles, enableCssModuleTSDeclaration, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetFallback, enableAssetManifest, disableSourceMap, convertToRem, disableMinimize, polyfill, dataUriLimit = 1e4, distPath = {}, ...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, less, sass, htmlPlugin, autoprefixer, ...toolsConfig } = {}, environments = {} } = uniBuilderConfig;
|
|
85
|
+
const { plugins: [...plugins] = [], performance: { ...performanceConfig } = {}, output: { disableFilenameHash, enableLatestDecorators, cssModuleLocalIdentName, enableInlineScripts, disableCssExtract, enableInlineStyles, enableCssModuleTSDeclaration, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetFallback, enableAssetManifest, disableSourceMap, convertToRem, disableMinimize, polyfill, dataUriLimit = 1e4, distPath = {}, ...outputConfig } = {}, html: { disableHtmlFolder, metaByEntries, titleByEntries, faviconByEntries, injectByEntries, templateByEntries, templateParametersByEntries, tagsByEntries, appIcon, tags, ...htmlConfig } = {}, source: { alias, globalVars, resolveMainFields, resolveExtensionPrefix, ...sourceConfig } = {}, dev, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, less, sass, htmlPlugin, autoprefixer, ...toolsConfig } = {}, environments = {} } = uniBuilderConfig;
|
|
86
86
|
const rsbuildConfig = {
|
|
87
87
|
plugins,
|
|
88
88
|
output: {
|
|
@@ -179,6 +179,14 @@ async function parseCommonConfig(uniBuilderConfig, options) {
|
|
|
179
179
|
...templateParametersByEntries[entryName] || {}
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
+
html.appIcon = typeof appIcon === "string" ? {
|
|
183
|
+
icons: [
|
|
184
|
+
{
|
|
185
|
+
src: appIcon,
|
|
186
|
+
size: 180
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
} : appIcon;
|
|
182
190
|
if (tags) {
|
|
183
191
|
html.tags = Array.isArray(tags) ? tags.filter((t) => typeof t !== "function").concat(tags.filter((t) => typeof t === "function")) : tags;
|
|
184
192
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
2
2
|
export declare const pluginAntd: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
2
2
|
export declare const pluginArco: () => RsbuildPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
2
|
-
import { DisableSourceMapOption } from '../../types';
|
|
2
|
+
import type { DisableSourceMapOption } from '../../types';
|
|
3
3
|
export declare const pluginDevtool: (options: {
|
|
4
4
|
disableSourceMap?: DisableSourceMapOption;
|
|
5
5
|
}) => RsbuildPlugin;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigChainWithContext, ConfigChain, DevConfig, RsbuildConfig, RsbuildTarget, Polyfill, ScriptInject, ServerConfig, RsbuildPluginAPI, OutputConfig, DistPathConfig, Rspack, RequestHandler, HtmlTagDescriptor, RsbuildPlugin } from '@rsbuild/core';
|
|
1
|
+
import type { ConfigChainWithContext, ConfigChain, DevConfig, HtmlConfig, RsbuildConfig, RsbuildTarget, Polyfill, ScriptInject, ServerConfig, RsbuildPluginAPI, OutputConfig, DistPathConfig, Rspack, RequestHandler, HtmlTagDescriptor, RsbuildPlugin } from '@rsbuild/core';
|
|
2
2
|
import type { PluginAssetsRetryOptions } from '@rsbuild/plugin-assets-retry';
|
|
3
3
|
import type { PluginStyledComponentsOptions } from '@rsbuild/plugin-styled-components';
|
|
4
4
|
import type { PluginRemOptions } from '@rsbuild/plugin-rem';
|
|
@@ -247,6 +247,7 @@ export type UniBuilderExtraConfig = {
|
|
|
247
247
|
disableCssExtract?: boolean;
|
|
248
248
|
};
|
|
249
249
|
html?: {
|
|
250
|
+
appIcon?: string | HtmlConfig['appIcon'];
|
|
250
251
|
/**
|
|
251
252
|
* Remove the folder of the HTML files.
|
|
252
253
|
* When this option is enabled, the generated HTML file path will change from `[name]/index.html` to `[name].html`.
|
|
@@ -366,7 +367,7 @@ export type DistPath = DistPathConfig & {
|
|
|
366
367
|
};
|
|
367
368
|
export type UniBuilderConfig = {
|
|
368
369
|
dev?: RsbuildConfig['dev'];
|
|
369
|
-
html?: RsbuildConfig['html']
|
|
370
|
+
html?: Omit<NonNullable<RsbuildConfig['html']>, 'appIcon'>;
|
|
370
371
|
output?: Omit<NonNullable<RsbuildConfig['output']>, 'polyfill' | 'distPath'> & {
|
|
371
372
|
polyfill?: Polyfill | 'ua';
|
|
372
373
|
distPath?: DistPath;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ToolsTerserConfig } from '../../types';
|
|
1
|
+
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
2
|
+
import type { ToolsTerserConfig } from '../../types';
|
|
3
3
|
export declare const pluginMinimize: (userTerserConfig?: ToolsTerserConfig) => RsbuildPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ConfigChainWithContext } from '@rsbuild/core';
|
|
2
2
|
import { type PluginBabelOptions } from '@rsbuild/plugin-babel';
|
|
3
3
|
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
4
4
|
import type { Options as RawTSLoaderOptions } from 'ts-loader';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/uni-builder",
|
|
3
|
-
"version": "2.58.
|
|
3
|
+
"version": "2.58.2",
|
|
4
4
|
"description": "Unified builder for Modern.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,24 +26,24 @@
|
|
|
26
26
|
"@babel/preset-react": "^7.22.15",
|
|
27
27
|
"@babel/types": "^7.24.7",
|
|
28
28
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
|
29
|
-
"@rsbuild/core": "1.0.1-beta.
|
|
30
|
-
"@rsbuild/plugin-assets-retry": "1.0.1-beta.
|
|
31
|
-
"@rsbuild/plugin-babel": "1.0.1-beta.
|
|
29
|
+
"@rsbuild/core": "1.0.1-beta.14",
|
|
30
|
+
"@rsbuild/plugin-assets-retry": "1.0.1-beta.14",
|
|
31
|
+
"@rsbuild/plugin-babel": "1.0.1-beta.14",
|
|
32
32
|
"@rsbuild/plugin-check-syntax": "1.0.1",
|
|
33
33
|
"@rsbuild/plugin-css-minimizer": "1.0.2",
|
|
34
|
-
"@rsbuild/plugin-less": "1.0.1-beta.
|
|
34
|
+
"@rsbuild/plugin-less": "1.0.1-beta.14",
|
|
35
35
|
"@rsbuild/plugin-pug": "1.0.2",
|
|
36
|
-
"@rsbuild/plugin-react": "1.0.1-beta.
|
|
36
|
+
"@rsbuild/plugin-react": "1.0.1-beta.14",
|
|
37
37
|
"@rsbuild/plugin-rem": "1.0.1",
|
|
38
|
-
"@rsbuild/plugin-sass": "1.0.1-beta.
|
|
38
|
+
"@rsbuild/plugin-sass": "1.0.1-beta.14",
|
|
39
39
|
"@rsbuild/plugin-source-build": "1.0.1",
|
|
40
40
|
"@rsbuild/plugin-styled-components": "1.0.1",
|
|
41
|
-
"@rsbuild/plugin-svgr": "1.0.1-beta.
|
|
41
|
+
"@rsbuild/plugin-svgr": "1.0.1-beta.14",
|
|
42
42
|
"@rsbuild/plugin-toml": "1.0.1",
|
|
43
|
-
"@rsbuild/plugin-type-check": "1.0.1-beta.
|
|
43
|
+
"@rsbuild/plugin-type-check": "1.0.1-beta.14",
|
|
44
44
|
"@rsbuild/plugin-typed-css-modules": "1.0.2",
|
|
45
45
|
"@rsbuild/plugin-yaml": "1.0.2",
|
|
46
|
-
"@rsbuild/webpack": "1.0.1-beta.
|
|
46
|
+
"@rsbuild/webpack": "1.0.1-beta.14",
|
|
47
47
|
"@swc/helpers": "0.5.3",
|
|
48
48
|
"autoprefixer": "10.4.19",
|
|
49
49
|
"babel-loader": "9.1.3",
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
"ts-loader": "9.4.4",
|
|
73
73
|
"webpack": "^5.93.0",
|
|
74
74
|
"webpack-subresource-integrity": "5.1.0",
|
|
75
|
-
"@modern-js/babel-preset": "2.58.
|
|
76
|
-
"@modern-js/utils": "2.58.
|
|
75
|
+
"@modern-js/babel-preset": "2.58.2",
|
|
76
|
+
"@modern-js/utils": "2.58.2"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@rsbuild/plugin-swc": "1.0.1-beta.
|
|
79
|
+
"@rsbuild/plugin-swc": "1.0.1-beta.14",
|
|
80
80
|
"@types/html-minifier-terser": "^7.0.2",
|
|
81
81
|
"@types/lodash": "^4.14.202",
|
|
82
82
|
"react": "^18.2.0",
|
|
83
83
|
"react-dom": "^18.2.0",
|
|
84
84
|
"terser": "^5.31.1",
|
|
85
85
|
"typescript": "^5.3.0",
|
|
86
|
-
"@scripts/
|
|
87
|
-
"@scripts/
|
|
86
|
+
"@scripts/vitest-config": "2.58.2",
|
|
87
|
+
"@scripts/build": "2.58.2"
|
|
88
88
|
},
|
|
89
89
|
"publishConfig": {
|
|
90
90
|
"access": "public",
|