medialize / medialize/URI.js

Please do not omit the file extension for the value of the "main" field in the package.json

Open
#457 0 comments 0 reactions 0 assignees View on GitHub

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

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.