@modern-js/app-tools 2.65.4 → 2.65.5

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.
@@ -103,7 +103,7 @@ const applyRouteOptions = (original, routeOptions) => {
103
103
  };
104
104
  const collectHtmlRoutes = (entrypoints, appContext, config) => {
105
105
  var _deploy_worker;
106
- const { source: { mainEntryName }, html: { disableHtmlFolder }, output: { distPath: { html: htmlPath } = {} }, server: { baseUrl, routes, ssr, ssrByEntries, rsc }, deploy } = config;
106
+ const { source: { mainEntryName }, html: { disableHtmlFolder, outputStructure }, output: { distPath: { html: htmlPath } = {} }, server: { baseUrl, routes, ssr, ssrByEntries, rsc }, deploy } = config;
107
107
  const { packageName } = appContext;
108
108
  const workerSSR = deploy === null || deploy === void 0 ? void 0 : (_deploy_worker = deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr;
109
109
  let htmlRoutes = entrypoints.reduce((previous, { entryName }) => {
@@ -117,7 +117,7 @@ const collectHtmlRoutes = (entrypoints, appContext, config) => {
117
117
  let route = {
118
118
  urlPath: `/${isMain ? "" : entryName}`,
119
119
  entryName,
120
- entryPath: (0, import_utils.removeLeadingSlash)(import_path.default.posix.normalize(`${htmlPath}/${entryName}${disableHtmlFolder ? ".html" : "/index.html"}`)),
120
+ entryPath: (0, import_utils.removeLeadingSlash)(import_path.default.posix.normalize(`${htmlPath}/${entryName}${disableHtmlFolder || outputStructure === "flat" ? ".html" : "/index.html"}`)),
121
121
  isSPA: true,
122
122
  isStream: isStream || isRSC,
123
123
  isSSR,
@@ -70,7 +70,7 @@ var applyRouteOptions = function(original, routeOptions) {
70
70
  };
71
71
  var collectHtmlRoutes = function(entrypoints, appContext, config) {
72
72
  var _deploy_worker;
73
- var mainEntryName = config.source.mainEntryName, disableHtmlFolder = config.html.disableHtmlFolder, _config_output = config.output, tmp = _config_output.distPath, _ref = tmp === void 0 ? {} : tmp, htmlPath = _ref.html, _config_server = config.server, baseUrl = _config_server.baseUrl, routes = _config_server.routes, ssr = _config_server.ssr, ssrByEntries = _config_server.ssrByEntries, rsc = _config_server.rsc, deploy = config.deploy;
73
+ var mainEntryName = config.source.mainEntryName, _config_html = config.html, disableHtmlFolder = _config_html.disableHtmlFolder, outputStructure = _config_html.outputStructure, _config_output = config.output, tmp = _config_output.distPath, _ref = tmp === void 0 ? {} : tmp, htmlPath = _ref.html, _config_server = config.server, baseUrl = _config_server.baseUrl, routes = _config_server.routes, ssr = _config_server.ssr, ssrByEntries = _config_server.ssrByEntries, rsc = _config_server.rsc, deploy = config.deploy;
74
74
  var packageName = appContext.packageName;
75
75
  var workerSSR = deploy === null || deploy === void 0 ? void 0 : (_deploy_worker = deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr;
76
76
  var htmlRoutes = entrypoints.reduce(function(previous, param) {
@@ -85,7 +85,7 @@ var collectHtmlRoutes = function(entrypoints, appContext, config) {
85
85
  var route = {
86
86
  urlPath: "/".concat(isMain ? "" : entryName),
87
87
  entryName,
88
- entryPath: removeLeadingSlash(path.posix.normalize("".concat(htmlPath, "/").concat(entryName).concat(disableHtmlFolder ? ".html" : "/index.html"))),
88
+ entryPath: removeLeadingSlash(path.posix.normalize("".concat(htmlPath, "/").concat(entryName).concat(disableHtmlFolder || outputStructure === "flat" ? ".html" : "/index.html"))),
89
89
  isSPA: true,
90
90
  isStream: isStream || isRSC,
91
91
  isSSR,
@@ -69,7 +69,7 @@ const applyRouteOptions = (original, routeOptions) => {
69
69
  };
70
70
  const collectHtmlRoutes = (entrypoints, appContext, config) => {
71
71
  var _deploy_worker;
72
- const { source: { mainEntryName }, html: { disableHtmlFolder }, output: { distPath: { html: htmlPath } = {} }, server: { baseUrl, routes, ssr, ssrByEntries, rsc }, deploy } = config;
72
+ const { source: { mainEntryName }, html: { disableHtmlFolder, outputStructure }, output: { distPath: { html: htmlPath } = {} }, server: { baseUrl, routes, ssr, ssrByEntries, rsc }, deploy } = config;
73
73
  const { packageName } = appContext;
74
74
  const workerSSR = deploy === null || deploy === void 0 ? void 0 : (_deploy_worker = deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr;
75
75
  let htmlRoutes = entrypoints.reduce((previous, { entryName }) => {
@@ -83,7 +83,7 @@ const collectHtmlRoutes = (entrypoints, appContext, config) => {
83
83
  let route = {
84
84
  urlPath: `/${isMain ? "" : entryName}`,
85
85
  entryName,
86
- entryPath: removeLeadingSlash(path.posix.normalize(`${htmlPath}/${entryName}${disableHtmlFolder ? ".html" : "/index.html"}`)),
86
+ entryPath: removeLeadingSlash(path.posix.normalize(`${htmlPath}/${entryName}${disableHtmlFolder || outputStructure === "flat" ? ".html" : "/index.html"}`)),
87
87
  isSPA: true,
88
88
  isStream: isStream || isRSC,
89
89
  isSSR,
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.65.4",
18
+ "version": "2.65.5",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -80,7 +80,7 @@
80
80
  "@babel/parser": "^7.22.15",
81
81
  "@babel/traverse": "^7.23.2",
82
82
  "@babel/types": "^7.26.0",
83
- "@rsbuild/core": "1.2.18",
83
+ "@rsbuild/core": "1.2.19",
84
84
  "@rsbuild/plugin-node-polyfill": "1.3.0",
85
85
  "@swc/helpers": "0.5.13",
86
86
  "es-module-lexer": "^1.1.0",
@@ -88,23 +88,23 @@
88
88
  "esbuild-register": "^3.5.0",
89
89
  "flatted": "^3.2.9",
90
90
  "mlly": "^1.6.1",
91
- "ndepe": "0.1.5",
91
+ "ndepe": "0.1.6",
92
92
  "pkg-types": "^1.1.0",
93
93
  "std-env": "^3.7.0",
94
- "@modern-js/core": "2.65.4",
95
- "@modern-js/node-bundle-require": "2.65.4",
96
- "@modern-js/plugin": "2.65.4",
97
- "@modern-js/plugin-v2": "2.65.4",
98
- "@modern-js/plugin-data-loader": "2.65.4",
99
- "@modern-js/prod-server": "2.65.4",
100
- "@modern-js/plugin-i18n": "2.65.4",
101
- "@modern-js/rsbuild-plugin-esbuild": "2.65.4",
102
- "@modern-js/server": "2.65.4",
103
- "@modern-js/server-core": "2.65.4",
104
- "@modern-js/server-utils": "2.65.4",
105
- "@modern-js/types": "2.65.4",
106
- "@modern-js/uni-builder": "2.65.4",
107
- "@modern-js/utils": "2.65.4"
94
+ "@modern-js/core": "2.65.5",
95
+ "@modern-js/node-bundle-require": "2.65.5",
96
+ "@modern-js/plugin-data-loader": "2.65.5",
97
+ "@modern-js/plugin-i18n": "2.65.5",
98
+ "@modern-js/plugin-v2": "2.65.5",
99
+ "@modern-js/rsbuild-plugin-esbuild": "2.65.5",
100
+ "@modern-js/prod-server": "2.65.5",
101
+ "@modern-js/server-core": "2.65.5",
102
+ "@modern-js/server": "2.65.5",
103
+ "@modern-js/server-utils": "2.65.5",
104
+ "@modern-js/types": "2.65.5",
105
+ "@modern-js/plugin": "2.65.5",
106
+ "@modern-js/uni-builder": "2.65.5",
107
+ "@modern-js/utils": "2.65.5"
108
108
  },
109
109
  "devDependencies": {
110
110
  "@rsbuild/plugin-webpack-swc": "1.0.12",
@@ -116,8 +116,8 @@
116
116
  "tsconfig-paths": "^4.2.0",
117
117
  "typescript": "^5",
118
118
  "webpack": "^5.98.0",
119
- "@scripts/build": "2.65.4",
120
- "@scripts/jest-config": "2.65.4"
119
+ "@scripts/build": "2.65.5",
120
+ "@scripts/jest-config": "2.65.5"
121
121
  },
122
122
  "peerDependencies": {
123
123
  "ts-node": "^10.7.0",
@@ -134,8 +134,7 @@
134
134
  "sideEffects": false,
135
135
  "publishConfig": {
136
136
  "registry": "https://registry.npmjs.org/",
137
- "access": "public",
138
- "provenance": true
137
+ "access": "public"
139
138
  },
140
139
  "scripts": {
141
140
  "new": "modern-lib new",