mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-21 13:40:31 -06:00
fix: /api/js endpoint to work on vercel (#2242)
This commit is contained in:
committed by
GitHub
parent
6c84850a7e
commit
4abe080db2
@@ -74,6 +74,5 @@ async function handleInit(req: NextRequest) {
|
||||
|
||||
async function loadAndAppendCode(path: string, append: string): Promise<string> {
|
||||
let jsCode = await fs.readFile(path, "utf-8");
|
||||
|
||||
return jsCode + append;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { createId } from "@paralleldrive/cuid2";
|
||||
import { withSentryConfig } from "@sentry/nextjs";
|
||||
import createJiti from "jiti";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const jiti = createJiti(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -20,6 +20,9 @@ const nextConfig = {
|
||||
experimental: {
|
||||
serverComponentsExternalPackages: ["@aws-sdk"],
|
||||
instrumentationHook: true,
|
||||
outputFileTracingIncludes: {
|
||||
"app/api/js": ["../../packages/**/*"],
|
||||
},
|
||||
},
|
||||
transpilePackages: ["@formbricks/database", "@formbricks/ee", "@formbricks/ui", "@formbricks/lib"],
|
||||
images: {
|
||||
|
||||
Reference in New Issue
Block a user