@modern-js/app-tools 2.49.1-alpha.14 → 2.49.1-alpha.16
Sign up to get free protection for your applications and to get access to all the features.
@@ -47,7 +47,6 @@ var deploy_default = () => ({
|
|
47
47
|
async beforeDeploy() {
|
48
48
|
const appContext = api.useAppContext();
|
49
49
|
const { appDirectory, distDirectory, serverInternalPlugins, sharedDirectory, apiDirectory, lambdaDirectory, metaName, entrypoints } = appContext;
|
50
|
-
console.log(appContext.entrypoints);
|
51
50
|
const { useSSR, useAPI, useWebServer } = (0, import_utils2.getProjectUsage)(appDirectory, distDirectory);
|
52
51
|
const needModernServer = useSSR || useAPI || useWebServer;
|
53
52
|
const configContext = api.useResolvedConfigContext();
|
@@ -87,6 +86,11 @@ var deploy_default = () => ({
|
|
87
86
|
dest: `/html/${entry.entryName}/index.html`
|
88
87
|
});
|
89
88
|
});
|
89
|
+
} else {
|
90
|
+
config2.routes.push({
|
91
|
+
src: "/(.*)",
|
92
|
+
dest: `/index`
|
93
|
+
});
|
90
94
|
}
|
91
95
|
await import_utils.fs.ensureDir(outputDirectory);
|
92
96
|
await import_utils.fs.writeJSON(import_path.default.join(outputDirectory, "config.json"), config2, {
|
@@ -22,7 +22,6 @@ function deploy_default() {
|
|
22
22
|
case 0:
|
23
23
|
appContext = api.useAppContext();
|
24
24
|
appDirectory = appContext.appDirectory, distDirectory = appContext.distDirectory, serverInternalPlugins = appContext.serverInternalPlugins, sharedDirectory = appContext.sharedDirectory, apiDirectory = appContext.apiDirectory, lambdaDirectory = appContext.lambdaDirectory, metaName = appContext.metaName, entrypoints = appContext.entrypoints;
|
25
|
-
console.log(appContext.entrypoints);
|
26
25
|
_getProjectUsage = getProjectUsage(appDirectory, distDirectory), useSSR = _getProjectUsage.useSSR, useAPI = _getProjectUsage.useAPI, useWebServer = _getProjectUsage.useWebServer;
|
27
26
|
needModernServer = useSSR || useAPI || useWebServer;
|
28
27
|
configContext = api.useResolvedConfigContext();
|
@@ -86,6 +85,11 @@ function deploy_default() {
|
|
86
85
|
dest: "/html/".concat(entry.entryName, "/index.html")
|
87
86
|
});
|
88
87
|
});
|
88
|
+
} else {
|
89
|
+
config.routes.push({
|
90
|
+
src: "/(.*)",
|
91
|
+
dest: "/index"
|
92
|
+
});
|
89
93
|
}
|
90
94
|
return [
|
91
95
|
4,
|
@@ -14,7 +14,6 @@ var deploy_default = () => ({
|
|
14
14
|
async beforeDeploy() {
|
15
15
|
const appContext = api.useAppContext();
|
16
16
|
const { appDirectory, distDirectory, serverInternalPlugins, sharedDirectory, apiDirectory, lambdaDirectory, metaName, entrypoints } = appContext;
|
17
|
-
console.log(appContext.entrypoints);
|
18
17
|
const { useSSR, useAPI, useWebServer } = getProjectUsage(appDirectory, distDirectory);
|
19
18
|
const needModernServer = useSSR || useAPI || useWebServer;
|
20
19
|
const configContext = api.useResolvedConfigContext();
|
@@ -54,6 +53,11 @@ var deploy_default = () => ({
|
|
54
53
|
dest: `/html/${entry.entryName}/index.html`
|
55
54
|
});
|
56
55
|
});
|
56
|
+
} else {
|
57
|
+
config2.routes.push({
|
58
|
+
src: "/(.*)",
|
59
|
+
dest: `/index`
|
60
|
+
});
|
57
61
|
}
|
58
62
|
await fse.ensureDir(outputDirectory);
|
59
63
|
await fse.writeJSON(path.join(outputDirectory, "config.json"), config2, {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.49.1-alpha.
|
18
|
+
"version": "2.49.1-alpha.16",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -79,20 +79,20 @@
|
|
79
79
|
"esbuild-register": "^3.5.0",
|
80
80
|
"mlly": "^1.6.1",
|
81
81
|
"pkg-types": "^1.1.0",
|
82
|
-
"@modern-js/node-bundle-require": "2.49.0",
|
83
|
-
"@modern-js/plugin-data-loader": "2.49.0",
|
84
82
|
"@modern-js/core": "2.49.0",
|
85
83
|
"@modern-js/plugin": "2.49.0",
|
84
|
+
"@modern-js/node-bundle-require": "2.49.0",
|
85
|
+
"@modern-js/plugin-data-loader": "2.49.0",
|
86
|
+
"@modern-js/prod-server": "2.49.0",
|
86
87
|
"@modern-js/plugin-i18n": "2.49.0",
|
87
88
|
"@modern-js/plugin-lint": "2.49.0",
|
88
|
-
"@modern-js/prod-server": "2.49.0",
|
89
89
|
"@modern-js/rsbuild-plugin-esbuild": "2.49.1",
|
90
|
-
"@modern-js/server-utils": "2.49.0",
|
91
|
-
"@modern-js/server-core": "2.49.0",
|
92
90
|
"@modern-js/server": "2.49.0",
|
93
|
-
"@modern-js/
|
91
|
+
"@modern-js/server-core": "2.49.0",
|
92
|
+
"@modern-js/types": "2.49.0",
|
93
|
+
"@modern-js/server-utils": "2.49.0",
|
94
94
|
"@modern-js/utils": "2.49.0",
|
95
|
-
"@modern-js/
|
95
|
+
"@modern-js/uni-builder": "2.49.0"
|
96
96
|
},
|
97
97
|
"devDependencies": {
|
98
98
|
"@rsbuild/plugin-swc": "0.6.4",
|