Fixed the example Job trigger file import path when using Pages Router with no path alias

This commit is contained in:
Eric Allam
2023-08-14 13:40:56 +01:00
parent e347389b64
commit b62df731fc
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/cli": patch
---
Fixed the example Job trigger file import path when using Pages Router with no path alias
+1 -1
View File
@@ -567,7 +567,7 @@ async function createTriggerPageRoute(
const { tsconfig } = await parse(tsConfigPath);
const pathAlias = getPathAlias(tsconfig, usesSrcDir);
const routePathPrefix = pathAlias ? pathAlias + "/" : "../..";
const routePathPrefix = pathAlias ? pathAlias + "/" : "../../";
const extension = isTypescriptProject ? ".ts" : ".js";
const triggerFileName = `trigger${extension}`;