Please do not omit the file extension for the value of the "main" field in the package.json
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.2k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
When I use Vite for bundling, if I configure "extensions" and it does not include ".js", it will cause an error.
The reason for this error is that the value of the "main" field omitted the file extension
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with package.json and inspect the current value of its "main" field, then review how the package is consumed when Vite's "extensions" excludes ".js". Confirm the change by reproducing the reported Vite configuration and verifying that bundling no longer fails because the main entry lacks its file extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vite
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100