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

Support ESM style import syntax with file extension #1810

Open
1 task done
felixxxxxs opened this issue Jul 1, 2024 · 0 comments
Open
1 task done

Support ESM style import syntax with file extension #1810

felixxxxxs opened this issue Jul 1, 2024 · 0 comments
Labels

Comments

@felixxxxxs
Copy link

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

When using nest g in an ESM project ("type": "module" in package.json), the generated import lines are incorrect because they are missing the file extension ".js" at the end.

Describe the solution you'd like

The Nest CLI should automatically determine if the current project is using ESM syntax, and if so, append the file extension ".js" to the generated import lines.

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

Currently, I have to manually add ".js" to the end of each generated import line, which is annoying. 🙂

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

No branches or pull requests

1 participant