@modern-js/app-tools 2.60.4-alpha.2 → 2.60.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/plugins/analyze/getFileSystemEntry.js +1 -1
- package/dist/cjs/plugins/analyze/getServerRoutes.js +4 -1
- package/dist/cjs/utils/register.js +3 -1
- package/dist/esm/plugins/analyze/getFileSystemEntry.js +1 -1
- package/dist/esm/plugins/analyze/getServerRoutes.js +6 -1
- package/dist/esm/utils/register.js +3 -1
- package/dist/esm-node/plugins/analyze/getFileSystemEntry.js +1 -1
- package/dist/esm-node/plugins/analyze/getServerRoutes.js +4 -1
- package/dist/esm-node/utils/register.js +3 -1
- package/package.json +17 -17
@@ -60,7 +60,7 @@ const scanDir = async (hookRunners, dirs, enableCustomEntry) => {
|
|
60
60
|
const entryName = import_path.default.basename(dir);
|
61
61
|
const customEntryFile = hasEntry(dir);
|
62
62
|
const customServerEntry = hasServerEntry(dir);
|
63
|
-
if (indexFile && !customBootstrap) {
|
63
|
+
if (!enableCustomEntry && indexFile && !customBootstrap) {
|
64
64
|
return {
|
65
65
|
entryName,
|
66
66
|
isMainEntry: false,
|
@@ -145,7 +145,10 @@ const collectStaticRoutes = (appContext, config) => {
|
|
145
145
|
const { appDirectory } = appContext;
|
146
146
|
const { source: { configDir }, server: { publicRoutes = {} } } = config;
|
147
147
|
const publicFolder = import_path.default.resolve(appDirectory, configDir || "", "public");
|
148
|
-
|
148
|
+
const ignoreFiles = [
|
149
|
+
".gitkeep"
|
150
|
+
];
|
151
|
+
return import_fs.default.existsSync(publicFolder) ? (0, import_utils2.walkDirectory)(publicFolder).filter((filePath) => !ignoreFiles.includes(import_path.default.basename(filePath))).map((filePath) => {
|
149
152
|
const urlPath = `${(0, import_utils.urlJoin)(toPosix(filePath).slice(toPosix(publicFolder).length))}`;
|
150
153
|
return {
|
151
154
|
urlPath: publicRoutes[(0, import_utils.removeLeadingSlash)(urlPath)] || urlPath,
|
@@ -104,7 +104,9 @@ const registerCompiler = async (appDir, distDir, alias) => {
|
|
104
104
|
...tsNodeOptions
|
105
105
|
});
|
106
106
|
} catch (error) {
|
107
|
-
|
107
|
+
if (process.env.DEBUG) {
|
108
|
+
import_utils.logger.error(error);
|
109
|
+
}
|
108
110
|
await registerEsbuild({
|
109
111
|
isTsProject,
|
110
112
|
tsConfig,
|
@@ -78,7 +78,7 @@ var scanDir = function() {
|
|
78
78
|
entryName = path.basename(dir);
|
79
79
|
customEntryFile = hasEntry(dir);
|
80
80
|
customServerEntry = hasServerEntry(dir);
|
81
|
-
if (indexFile && !customBootstrap) {
|
81
|
+
if (!enableCustomEntry && indexFile && !customBootstrap) {
|
82
82
|
return [
|
83
83
|
2,
|
84
84
|
{
|
@@ -110,7 +110,12 @@ var collectStaticRoutes = function(appContext, config) {
|
|
110
110
|
var appDirectory = appContext.appDirectory;
|
111
111
|
var configDir = config.source.configDir, _config_server = config.server, _config_server_publicRoutes = _config_server.publicRoutes, publicRoutes = _config_server_publicRoutes === void 0 ? {} : _config_server_publicRoutes;
|
112
112
|
var publicFolder = path.resolve(appDirectory, configDir || "", "public");
|
113
|
-
|
113
|
+
var ignoreFiles = [
|
114
|
+
".gitkeep"
|
115
|
+
];
|
116
|
+
return fs.existsSync(publicFolder) ? walkDirectory(publicFolder).filter(function(filePath) {
|
117
|
+
return !ignoreFiles.includes(path.basename(filePath));
|
118
|
+
}).map(function(filePath) {
|
114
119
|
var urlPath = "".concat(urlJoin(toPosix(filePath).slice(toPosix(publicFolder).length)));
|
115
120
|
return {
|
116
121
|
urlPath: publicRoutes[removeLeadingSlash(urlPath)] || urlPath,
|
@@ -27,7 +27,7 @@ const scanDir = async (hookRunners, dirs, enableCustomEntry) => {
|
|
27
27
|
const entryName = path.basename(dir);
|
28
28
|
const customEntryFile = hasEntry(dir);
|
29
29
|
const customServerEntry = hasServerEntry(dir);
|
30
|
-
if (indexFile && !customBootstrap) {
|
30
|
+
if (!enableCustomEntry && indexFile && !customBootstrap) {
|
31
31
|
return {
|
32
32
|
entryName,
|
33
33
|
isMainEntry: false,
|
@@ -112,7 +112,10 @@ const collectStaticRoutes = (appContext, config) => {
|
|
112
112
|
const { appDirectory } = appContext;
|
113
113
|
const { source: { configDir }, server: { publicRoutes = {} } } = config;
|
114
114
|
const publicFolder = path.resolve(appDirectory, configDir || "", "public");
|
115
|
-
|
115
|
+
const ignoreFiles = [
|
116
|
+
".gitkeep"
|
117
|
+
];
|
118
|
+
return fs.existsSync(publicFolder) ? walkDirectory(publicFolder).filter((filePath) => !ignoreFiles.includes(path.basename(filePath))).map((filePath) => {
|
116
119
|
const urlPath = `${urlJoin(toPosix(filePath).slice(toPosix(publicFolder).length))}`;
|
117
120
|
return {
|
118
121
|
urlPath: publicRoutes[removeLeadingSlash(urlPath)] || urlPath,
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.60.
|
18
|
+
"version": "2.60.5",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -78,7 +78,7 @@
|
|
78
78
|
"@babel/traverse": "^7.23.2",
|
79
79
|
"@babel/types": "^7.24.7",
|
80
80
|
"@rsbuild/core": "~1.0.11",
|
81
|
-
"@rsbuild/plugin-node-polyfill": "~1.0
|
81
|
+
"@rsbuild/plugin-node-polyfill": "~1.2.0",
|
82
82
|
"@swc/helpers": "0.5.13",
|
83
83
|
"@vercel/nft": "^0.26.4",
|
84
84
|
"es-module-lexer": "^1.1.0",
|
@@ -88,19 +88,19 @@
|
|
88
88
|
"mlly": "^1.6.1",
|
89
89
|
"pkg-types": "^1.1.0",
|
90
90
|
"std-env": "^3.7.0",
|
91
|
-
"@modern-js/node-bundle-require": "2.60.
|
92
|
-
"@modern-js/
|
93
|
-
"@modern-js/
|
94
|
-
"@modern-js/plugin": "2.60.
|
95
|
-
"@modern-js/plugin
|
96
|
-
"@modern-js/prod-server": "2.60.
|
97
|
-
"@modern-js/
|
98
|
-
"@modern-js/
|
99
|
-
"@modern-js/server": "2.60.
|
100
|
-
"@modern-js/
|
101
|
-
"@modern-js/
|
102
|
-
"@modern-js/utils": "2.60.
|
103
|
-
"@modern-js/uni-builder": "2.60.
|
91
|
+
"@modern-js/node-bundle-require": "2.60.5",
|
92
|
+
"@modern-js/core": "2.60.5",
|
93
|
+
"@modern-js/plugin-data-loader": "2.60.5",
|
94
|
+
"@modern-js/plugin-i18n": "2.60.5",
|
95
|
+
"@modern-js/plugin": "2.60.5",
|
96
|
+
"@modern-js/prod-server": "2.60.5",
|
97
|
+
"@modern-js/rsbuild-plugin-esbuild": "2.60.5",
|
98
|
+
"@modern-js/server": "2.60.5",
|
99
|
+
"@modern-js/server-core": "2.60.5",
|
100
|
+
"@modern-js/server-utils": "2.60.5",
|
101
|
+
"@modern-js/types": "2.60.5",
|
102
|
+
"@modern-js/utils": "2.60.5",
|
103
|
+
"@modern-js/uni-builder": "2.60.5"
|
104
104
|
},
|
105
105
|
"devDependencies": {
|
106
106
|
"@rsbuild/plugin-webpack-swc": "~1.0.3",
|
@@ -112,8 +112,8 @@
|
|
112
112
|
"tsconfig-paths": "^4.2.0",
|
113
113
|
"typescript": "^5",
|
114
114
|
"webpack": "^5.95.0",
|
115
|
-
"@scripts/build": "2.60.
|
116
|
-
"@scripts/jest-config": "2.60.
|
115
|
+
"@scripts/build": "2.60.5",
|
116
|
+
"@scripts/jest-config": "2.60.5"
|
117
117
|
},
|
118
118
|
"peerDependencies": {
|
119
119
|
"ts-node": "^10.7.0",
|