Skip to content

Commit de1a72a

Browse files
authored
fix: netlify server not correctly requied (#8543)
1 parent dd0764c commit de1a72a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/clever-numbers-dance.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@modern-js/app-tools': patch
3+
---
4+
5+
fix: netlify function not get the right server path
6+
fix: netlify function 未获取正确的 server 路径

packages/solutions/app-tools/src/plugins/deploy/utils/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const getPluginsCode = (plugins: PluginItem[]) => {
5858
};
5959

6060
export const getServerConfigPath = (meta: string) =>
61-
`"${normalizePath(path.join(SERVER_DIR, `${meta}.server`))}"`;
61+
`path.join(__dirname, "${SERVER_DIR}", "${meta}.server")`;
6262

6363
export interface GenerateHandlerOptions {
6464
template: string;

0 commit comments

Comments
 (0)