Skip to content

fix(resolve): skip module field when the importer is a require call#7438

Merged
patak-cat merged 1 commit intovitejs:mainfrom
haoqunjiang:fix-json-bigint
Mar 24, 2022
Merged

fix(resolve): skip module field when the importer is a require call#7438
patak-cat merged 1 commit intovitejs:mainfrom
haoqunjiang:fix-json-bigint

Conversation

@haoqunjiang
Copy link
Member

Description

Fixes #7053

Additional context

I used a require-pkg-with-module-field package in the test, instead of
json-bigint, because I need to pin the bignumber.js version to 9.0.2
in case it changed its package.json in future releases.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Fixes vitejs#7053

I used a `require-pkg-with-module-field` package in the test, instead of
`json-bigint`, because I need to pin the `bignumber.js` version to 9.0.2
in case it changed its `package.json` in future releases.
@haoqunjiang haoqunjiang added the p3-minor-bug An edge case that only affects very specific usage (priority) label Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p3-minor-bug An edge case that only affects very specific usage (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some problems caused by vite precompilation when importing the JSON-BigInt module 导入json-bigint模块的时候出现的一些问题

2 participants