vite icon indicating copy to clipboard operation
vite copied to clipboard

fix(server): only warn sourcemap in `loadTransform` when explicitly turned on

Open antfu opened this issue 1 year ago • 2 comments

Description

We got quite some warnings regarding sourcemap when we never need them, and it seems there is no way to disable it:

image

This kind of warning is generally useless but quite annoying to the end users. I think it make more sense only to warn when sourcemap is enabled.

Additional context


What is the purpose of this pull request?

  • [x] Bug fix
  • [ ] New Feature
  • [ ] Documentation update
  • [ ] Other

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

  • [x] Read the Contributing Guidelines, especially the Pull Request Guidelines.
  • [x] 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).
  • [ ] Update the corresponding documentation if needed.
  • [ ] Ideally, include relevant tests that fail without this PR but pass with it.

antfu avatar Jan 24 '24 17:01 antfu

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@antfu are you still interested in pushing forward this PR? I had update the warning in https://github.com/vitejs/vite/pull/16170 to print the entire error instead, and I usually find actual configuration error that should be fixed instead of hiding.

bluwy avatar May 18 '24 07:05 bluwy

I'll close this for now as the updated warning should be more helpful now.

bluwy avatar Jul 24 '24 10:07 bluwy