-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: /api/js endpoint to work on vercel #2242
fix: /api/js endpoint to work on vercel #2242
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you for following the naming conventions for pull request titles! 🙏 |
apps/web/next.config.mjsConsider using destructuring assignment for the 'path' module to make the code more readable and concise. This way, you won't need to repeat 'path.' every time you want to call a method from the 'path' module. const { dirname, join } = require('path');
const __dirname = dirname(fileURLToPath(import.meta.url));
outputFileTracingRoot: join(__dirname, "../../"),
Consider storing the result of 'fileURLToPath(import.meta.url)' in a variable since it is used multiple times. This way, you avoid unnecessary function calls which can improve the performance of your code. const filePath = fileURLToPath(import.meta.url);
const jiti = createJiti(filePath);
const __dirname = dirname(filePath);
|
2e4c289
to
ae6b028
Compare
3cd864f
to
ab575bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShubhamPalriwala thank you :-) looks good!
What does this PR do?
Makes the
/api/js
endpoint work on VercelFixes # (issue)
How should this be tested?
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated