@modern-js/uni-builder 0.0.0-nightly-20240413170635 → 0.0.0-nightly-20240417170715

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.
@@ -108,10 +108,13 @@ 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, ...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, 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
- output: outputConfig,
114
+ output: {
115
+ polyfill: polyfill === "ua" ? "off" : polyfill,
116
+ ...outputConfig
117
+ },
115
118
  source: {
116
119
  alias,
117
120
  ...sourceConfig
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { NodeEnv, MetaOptions, ServerConfig, ScriptInject, RsbuildTarget, ChainedConfig, ChainedConfigWithUtils, InlineChunkTest, DevConfig, RequestHandler, RsbuildEntry, MaybePromise, RsbuildPluginAPI, ArrayOrNot, HtmlTagDescriptor } from '@rsbuild/shared';
1
+ import type { NodeEnv, MetaOptions, ServerConfig, ScriptInject, RsbuildTarget, ChainedConfig, ChainedConfigWithUtils, InlineChunkTest, DevConfig, RequestHandler, RsbuildEntry, MaybePromise, RsbuildPluginAPI, ArrayOrNot, HtmlTagDescriptor, Polyfill } from '@rsbuild/shared';
2
2
  import type { RsbuildConfig } from '@rsbuild/core';
3
3
  import type { PluginAssetsRetryOptions } from '@rsbuild/plugin-assets-retry';
4
4
  import type { PluginStyledComponentsOptions } from '@rsbuild/plugin-styled-components';
@@ -324,7 +324,9 @@ export type UniBuilderPlugin = {
324
324
  export type UniBuilderConfig = {
325
325
  dev?: RsbuildConfig['dev'];
326
326
  html?: RsbuildConfig['html'];
327
- output?: RsbuildConfig['output'];
327
+ output?: Omit<NonNullable<RsbuildConfig['output']>, 'polyfill'> & {
328
+ polyfill?: Polyfill | 'ua';
329
+ };
328
330
  performance?: RsbuildConfig['performance'];
329
331
  security?: RsbuildConfig['security'];
330
332
  tools?: RsbuildConfig['tools'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/uni-builder",
3
- "version": "0.0.0-nightly-20240413170635",
3
+ "version": "0.0.0-nightly-20240417170715",
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.1",
30
- "@rsbuild/core": "0.6.1",
31
- "@rsbuild/plugin-assets-retry": "0.6.1",
32
- "@rsbuild/plugin-babel": "0.6.1",
33
- "@rsbuild/plugin-check-syntax": "0.6.1",
34
- "@rsbuild/plugin-css-minimizer": "0.6.1",
35
- "@rsbuild/plugin-pug": "0.6.1",
36
- "@rsbuild/plugin-react": "0.6.1",
37
- "@rsbuild/plugin-rem": "0.6.1",
38
- "@rsbuild/plugin-source-build": "0.6.1",
39
- "@rsbuild/plugin-styled-components": "0.6.1",
40
- "@rsbuild/plugin-svgr": "0.6.1",
41
- "@rsbuild/plugin-type-check": "0.6.1",
42
- "@rsbuild/plugin-toml": "0.6.1",
43
- "@rsbuild/plugin-yaml": "0.6.1",
44
- "@rsbuild/shared": "0.6.1",
45
- "@rsbuild/webpack": "0.6.1",
29
+ "@rsbuild/babel-preset": "0.6.3",
30
+ "@rsbuild/core": "0.6.3",
31
+ "@rsbuild/plugin-assets-retry": "0.6.3",
32
+ "@rsbuild/plugin-babel": "0.6.3",
33
+ "@rsbuild/plugin-check-syntax": "0.6.3",
34
+ "@rsbuild/plugin-css-minimizer": "0.6.3",
35
+ "@rsbuild/plugin-pug": "0.6.3",
36
+ "@rsbuild/plugin-react": "0.6.3",
37
+ "@rsbuild/plugin-rem": "0.6.3",
38
+ "@rsbuild/plugin-source-build": "0.6.3",
39
+ "@rsbuild/plugin-styled-components": "0.6.3",
40
+ "@rsbuild/plugin-svgr": "0.6.3",
41
+ "@rsbuild/plugin-type-check": "0.6.3",
42
+ "@rsbuild/plugin-toml": "0.6.3",
43
+ "@rsbuild/plugin-yaml": "0.6.3",
44
+ "@rsbuild/shared": "0.6.3",
45
+ "@rsbuild/webpack": "0.6.3",
46
46
  "@swc/helpers": "0.5.3",
47
47
  "babel-loader": "9.1.3",
48
48
  "babel-plugin-import": "1.13.5",
@@ -67,18 +67,18 @@
67
67
  "webpack": "^5.91.0",
68
68
  "webpack-manifest-plugin": "5.0.0",
69
69
  "webpack-subresource-integrity": "5.1.0",
70
- "@modern-js/utils": "0.0.0-nightly-20240413170635",
71
- "@modern-js/server": "0.0.0-nightly-20240413170635"
70
+ "@modern-js/utils": "0.0.0-nightly-20240417170715",
71
+ "@modern-js/server": "0.0.0-nightly-20240417170715"
72
72
  },
73
73
  "devDependencies": {
74
- "@rsbuild/plugin-swc": "0.6.1",
74
+ "@rsbuild/plugin-swc": "0.6.3",
75
75
  "@types/lodash": "^4.14.202",
76
76
  "react": "^18.2.0",
77
77
  "react-dom": "^18.2.0",
78
78
  "typescript": "^5.3.0",
79
- "@modern-js/prod-server": "0.0.0-nightly-20240413170635",
80
- "@scripts/build": "0.0.0-nightly-20240413170635",
81
- "@scripts/vitest-config": "0.0.0-nightly-20240413170635"
79
+ "@scripts/build": "0.0.0-nightly-20240417170715",
80
+ "@modern-js/prod-server": "0.0.0-nightly-20240417170715",
81
+ "@scripts/vitest-config": "0.0.0-nightly-20240417170715"
82
82
  },
83
83
  "publishConfig": {
84
84
  "access": "public",