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

fix: rename vite config file as .mjs to indicate ESM #131

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

andy89923
Copy link
Collaborator

@andy89923 andy89923 commented Jan 2, 2025

Description

The CJS build of Vite's Node API is deprecated and will be removed in Vite 6
src: https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated

Others

To log the stack trace about CJS:

yarn dev:trace

Copy link
Contributor

@Alonza0314 Alonza0314 left a comment

Choose a reason for hiding this comment

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

LGTM!!

This PR highlights the transition to ESM for Vite configurations. Our existing implementation is already using ESM (import/export), so no major changes are required on our side. I've tested again with this PR and it works well as before.

@andy89923
Copy link
Collaborator Author

This PR removes the warning since we use the .ts extension for the vite config file, which indicates it's a CJS build, even though we didn't use CJS in any way.

@ianchen0119 ianchen0119 merged commit 23448bd into main Jan 22, 2025
4 checks passed
@ianchen0119
Copy link
Contributor

Hi @Alonza0314

Please help to patch to next branch.
Many thanks.

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.

3 participants