Skip to content

Conversation

@Moazzum786
Copy link

Summary

  • Added "type": "module" to Angular and React package.json.ejs templates.
  • Vue template already includes "type": "module", so no change needed.
  • Aligns all client frameworks (Angular, React, Vue) with ESM-by-default setup.

Why

Implements the ESM migration part of issue #30509.
Removes the need for .mjs handling and improves compatibility with Node 18+ and modern bundlers.

Fixes #30509


Additional Notes

  • Verified that Vue already had "type": "module".
  • Ran npm run lint and npm test locally — all checks passed.
  • Commit follows JHipster’s Conventional Commit Guidelines.

Checklist

Please make sure the below checklist is followed for Pull Requests.


Maintainer Note

Hi @mshima @DanielFran 👋
This PR implements the ESM migration for Angular and React package templates as part of #30509 (bug bounty issue).
✅ All tests and lint checks pass locally.
Thanks for reviewing!

@Moazzum786
Copy link
Author

Hi @mshima @DanielFran 👋

This PR completes the ESM migration for Angular and React package.json.ejs templates.
Vue already had "type": "module", so no change was needed.

✅ All local tests (npm test) and linter checks (npm run lint) passed successfully.
🎯 Implements and closes #30509 (bug bounty issue).

Thanks for reviewing! 🙌

@mshima
Copy link
Member

mshima commented Nov 9, 2025

This PR is far from be acceptable.

@mshima mshima closed this Nov 9, 2025
@Moazzum786
Copy link
Author

Hi @mshima 👋
Thanks for the quick feedback!

Could you please clarify which parts of the PR are not acceptable or what needs to be done differently?
I’d really like to correct it properly and re-submit the right way.

This was my first contribution, so I’d appreciate any guidance on how to align with the project’s standards.

@mshima
Copy link
Member

mshima commented Nov 9, 2025

@Moazzum786 please see related PRs from the issue.
The issue is much more complex than just adding type module to package.json.

@Moazzum786
Copy link
Author

Got it, @mshima — thank you for clarifying.

I understand now that issue #30509 involves a broader internal ESM migration, not just adding "type": "module".

I’ll review the related PRs you mentioned (#30520, #30655, #31283, #31298, #31306) to understand the full scope before attempting further contributions.
Appreciate your time and explanation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make type: 'module' mandatory in package.json

2 participants