Skip to content
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

Add TS path aliases, allow HMR and environment variables validation using zod #17

Closed
wants to merge 2 commits into from

Conversation

saenyakorn
Copy link
Contributor

What I did

  • Allow us to use Typescript path alias (Already test on dev, build and start command)
  • Enable HMR for development
  • Validate environment variables using Zod before starting the application

@saenyakorn
Copy link
Contributor Author

Here's the example of env validation

Screenshot 2566-05-17 at 12 12 03

Copy link

@SaltyAom SaltyAom left a comment

Choose a reason for hiding this comment

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

Good stuff, but I would have an urge for path aliasing, might need discussion.

Leaving this to other reviewer.

@saenyakorn
Copy link
Contributor Author

Yeah, it's weird that it need tsc-alias. But I only have much time to fix the issue. So, I decide to use it first.

"module": "ESNext",
"lib": ["ESNext"],
"target": "esnext",
"module": "commonjs",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why commonjs?

Choose a reason for hiding this comment

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

Because Node ESModule compatibility is bad

@dtinth
Copy link
Collaborator

dtinth commented May 17, 2023

thank you for the suggestion, zod env validation has been added here and i added you as a co author 78189c3

@leomotors leomotors mentioned this pull request May 18, 2023
9 tasks
@saenyakorn
Copy link
Contributor Author

Close this since it outdated

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.

None yet

4 participants