Skip to content

fix: resolve tsconfig paths with tsx #68

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

zirkelc
Copy link
Contributor

@zirkelc zirkelc commented Jun 24, 2025

Fixes #60

This PR replaces jiti with tsx to load the serverless.ts config because tsx resolves tsconfig.paths while jiti does not yet (unjs/jiti#373)

I will try to add a new test case with a tsconfig.json and paths.

@@ -56,12 +56,19 @@ const parseConfigurationFile = async (configurationPath) => {
case '.ts':
case '.mts': {
try {
const { createJiti } = require('jiti');
const jiti = createJiti(null, { interopDefault: true });
// const { createJiti } = require('jiti');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't leave in the old commented out code.

@zirkelc
Copy link
Contributor Author

zirkelc commented Jun 25, 2025

Sorry, I didn't want to push my local lockfile and the incomplete test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants