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

fix: sourcemap source point to null #8299

merged 19 commits into from May 29, 2022


Copy link

@poyoho poyoho commented May 24, 2022


fix: #8289 (comment)

For example:
if the file just transform by importMetaGlob plugin it will got an error.

Additional context

in dev mode if plugin no generate map field, will generate by middleware.

I think we can resolve it by setting generateMap({ source: id }) like pluginContainer default generate sourcemap.

force set build.sourcemap === true when in dev mode, but I think force setting of this value may confuse users when resolvingConfig hook

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.

@poyoho poyoho changed the title chore: force setting sourcemap: true in dev chore: set sourcemap source May 25, 2022
@poyoho poyoho closed this May 28, 2022
@poyoho poyoho reopened this May 28, 2022
@poyoho poyoho marked this pull request as draft May 28, 2022 16:06
@poyoho poyoho marked this pull request as ready for review May 28, 2022 16:25
@poyoho poyoho changed the title chore: set sourcemap source fix: set sourcemap source May 28, 2022
@poyoho poyoho changed the title fix: set sourcemap source fix: sourcemap source point to null May 28, 2022
sapphi-red previously approved these changes May 29, 2022
Copy link

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@patak-dev patak-dev merged commit 356b896 into vitejs:main May 29, 2022
@poyoho poyoho deleted the chore/force-set-sourcemap branch May 29, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Sourcemap in dev mode
3 participants