@modern-js/uni-builder 0.0.0-nightly-20240109170615 → 0.0.0-nightly-20240110170629

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.
@@ -107,7 +107,11 @@ async function startDevServer(rsbuild, options = {}, builderConfig) {
107
107
  (0, import_shared.debug)("create dev server done");
108
108
  await rsbuildServer.beforeStart();
109
109
  const protocol = devConfig.https ? "https" : "http";
110
- const urls = (0, import_shared.getAddressUrls)(protocol, port, host);
110
+ const urls = (0, import_shared.getAddressUrls)({
111
+ protocol,
112
+ port,
113
+ host
114
+ });
111
115
  (0, import_shared.debug)("listen dev server");
112
116
  await server.init();
113
117
  return new Promise((resolve) => {
@@ -34,6 +34,8 @@ __export(parseCommonConfig_exports, {
34
34
  module.exports = __toCommonJS(parseCommonConfig_exports);
35
35
  var import_shared = require("@rsbuild/shared");
36
36
  var import_core = require("@rsbuild/core");
37
+ var import_plugin_toml = require("@rsbuild/plugin-toml");
38
+ var import_plugin_yaml = require("@rsbuild/plugin-yaml");
37
39
  var import_plugin_react = require("@rsbuild/plugin-react");
38
40
  var import_globalVars = require("./plugins/globalVars");
39
41
  var import_runtimeChunk = require("./plugins/runtimeChunk");
@@ -92,7 +94,7 @@ async function getBrowserslistWithDefault(path, config, target) {
92
94
  }
93
95
  async function parseCommonConfig(uniBuilderConfig, options) {
94
96
  var _uniBuilderConfig_output, _uniBuilderConfig_output1, _uniBuilderConfig_output2, _uniBuilderConfig_html, _uniBuilderConfig_html1, _uniBuilderConfig_html2, _uniBuilderConfig_html3, _uniBuilderConfig_html4, _uniBuilderConfig_html5, _devServer_devMiddleware, _uniBuilderConfig_source, _uniBuilderConfig_output3, _uniBuilderConfig_security, _uniBuilderConfig_output4, _uniBuilderConfig_output5, _uniBuilderConfig_source1, _uniBuilderConfig_source2, _uniBuilderConfig_output6, _uniBuilderConfig_output7, _uniBuilderConfig_experiments, _uniBuilderConfig_tools, _uniBuilderConfig_output8, _uniBuilderConfig_output9, _uniBuilderConfig_tools1;
95
- var _output, _output_distPath, _output1, _extraConfig, _html, _extraConfig1;
97
+ var _output, _output_distPath, _output_distPath1, _output1, _extraConfig, _html, _extraConfig1;
96
98
  const { cwd, frameworkConfigPath, entry, target } = options;
97
99
  const rsbuildConfig = (0, import_shared.deepmerge)({}, uniBuilderConfig);
98
100
  const { dev = {}, html = {}, output = {}, tools = {} } = rsbuildConfig;
@@ -106,6 +108,8 @@ async function parseCommonConfig(uniBuilderConfig, options) {
106
108
  (_distPath = (_output = output).distPath) !== null && _distPath !== void 0 ? _distPath : _output.distPath = {};
107
109
  var _html1;
108
110
  (_html1 = (_output_distPath = output.distPath).html) !== null && _html1 !== void 0 ? _html1 : _output_distPath.html = "html";
111
+ var _server;
112
+ (_server = (_output_distPath1 = output.distPath).server) !== null && _server !== void 0 ? _server : _output_distPath1.server = "bundles";
109
113
  var _polyfill;
110
114
  (_polyfill = (_output1 = output).polyfill) !== null && _polyfill !== void 0 ? _polyfill : _output1.polyfill = "entry";
111
115
  if (output.disableCssModuleExtension) {
@@ -221,7 +225,9 @@ async function parseCommonConfig(uniBuilderConfig, options) {
221
225
  (0, import_devtools.pluginDevtool)({
222
226
  disableSourceMap: (_uniBuilderConfig_output3 = uniBuilderConfig.output) === null || _uniBuilderConfig_output3 === void 0 ? void 0 : _uniBuilderConfig_output3.disableSourceMap
223
227
  }),
224
- (0, import_emitRouteFile.pluginEmitRouteFile)()
228
+ (0, import_emitRouteFile.pluginEmitRouteFile)(),
229
+ (0, import_plugin_toml.pluginToml)(),
230
+ (0, import_plugin_yaml.pluginYaml)()
225
231
  ];
226
232
  const checkSyntaxOptions = (_uniBuilderConfig_security = uniBuilderConfig.security) === null || _uniBuilderConfig_security === void 0 ? void 0 : _uniBuilderConfig_security.checkSyntax;
227
233
  if (checkSyntaxOptions) {
@@ -68,6 +68,11 @@ const pluginBabel = (options) => ({
68
68
  version: config2.output.enableLatestDecorators ? "2018-09" : "legacy"
69
69
  };
70
70
  const baseBabelConfig = isServer || isServiceWorker ? (0, import_node.getBabelConfigForNode)({
71
+ presetEnv: {
72
+ targets: [
73
+ "node >= 14"
74
+ ]
75
+ },
71
76
  pluginDecorators: decoratorConfig
72
77
  }) : (0, import_web.getBabelConfigForWeb)({
73
78
  presetEnv: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/uni-builder",
3
- "version": "0.0.0-nightly-20240109170615",
3
+ "version": "0.0.0-nightly-20240110170629",
4
4
  "description": "Unified builder for Modern.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,21 +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.2.17",
30
- "@rsbuild/core": "0.2.17",
31
- "@rsbuild/plugin-assets-retry": "0.2.17",
32
- "@rsbuild/plugin-babel": "0.2.17",
33
- "@rsbuild/plugin-check-syntax": "0.2.17",
34
- "@rsbuild/plugin-css-minimizer": "0.2.17",
35
- "@rsbuild/plugin-pug": "0.2.17",
36
- "@rsbuild/plugin-react": "0.2.17",
37
- "@rsbuild/plugin-rem": "0.2.17",
38
- "@rsbuild/plugin-source-build": "0.2.17",
39
- "@rsbuild/plugin-styled-components": "0.2.17",
40
- "@rsbuild/plugin-svgr": "0.2.17",
41
- "@rsbuild/plugin-type-check": "0.2.17",
42
- "@rsbuild/shared": "0.2.17",
43
- "@rsbuild/webpack": "0.2.17",
29
+ "@rsbuild/babel-preset": "0.3.0",
30
+ "@rsbuild/core": "0.3.0",
31
+ "@rsbuild/plugin-assets-retry": "0.3.0",
32
+ "@rsbuild/plugin-babel": "0.3.0",
33
+ "@rsbuild/plugin-check-syntax": "0.3.0",
34
+ "@rsbuild/plugin-css-minimizer": "0.3.0",
35
+ "@rsbuild/plugin-pug": "0.3.0",
36
+ "@rsbuild/plugin-react": "0.3.0",
37
+ "@rsbuild/plugin-rem": "0.3.0",
38
+ "@rsbuild/plugin-source-build": "0.3.0",
39
+ "@rsbuild/plugin-styled-components": "0.3.0",
40
+ "@rsbuild/plugin-svgr": "0.3.0",
41
+ "@rsbuild/plugin-type-check": "0.3.0",
42
+ "@rsbuild/plugin-toml": "0.3.0",
43
+ "@rsbuild/plugin-yaml": "0.3.0",
44
+ "@rsbuild/shared": "0.3.0",
45
+ "@rsbuild/webpack": "0.3.0",
44
46
  "@swc/helpers": "0.5.3",
45
47
  "babel-loader": "9.1.3",
46
48
  "babel-plugin-import": "1.13.5",
@@ -62,19 +64,19 @@
62
64
  "webpack": "^5.89.0",
63
65
  "webpack-manifest-plugin": "5.0.0",
64
66
  "webpack-subresource-integrity": "5.1.0",
65
- "@modern-js/utils": "0.0.0-nightly-20240109170615",
66
- "@modern-js/server": "0.0.0-nightly-20240109170615",
67
- "@modern-js/prod-server": "0.0.0-nightly-20240109170615"
67
+ "@modern-js/utils": "0.0.0-nightly-20240110170629",
68
+ "@modern-js/server": "0.0.0-nightly-20240110170629",
69
+ "@modern-js/prod-server": "0.0.0-nightly-20240110170629"
68
70
  },
69
71
  "devDependencies": {
70
- "@rsbuild/plugin-swc": "0.2.17",
72
+ "@rsbuild/plugin-swc": "0.3.0",
71
73
  "@types/lodash": "^4.14.202",
72
74
  "react": "^18.2.0",
73
75
  "react-dom": "^18.2.0",
74
76
  "typescript": "^5.3.0",
75
- "@modern-js/builder-plugin-node-polyfill": "0.0.0-nightly-20240109170615",
76
- "@scripts/build": "0.0.0-nightly-20240109170615",
77
- "@scripts/vitest-config": "0.0.0-nightly-20240109170615"
77
+ "@modern-js/builder-plugin-node-polyfill": "0.0.0-nightly-20240110170629",
78
+ "@scripts/build": "0.0.0-nightly-20240110170629",
79
+ "@scripts/vitest-config": "0.0.0-nightly-20240110170629"
78
80
  },
79
81
  "publishConfig": {
80
82
  "access": "public",