fix: ignore directive sourcemap error#369
Conversation
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 4.3.1 | 4.3.2 | ## [v4.3.2](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#432-2024-09-29) Ignore directive sourcemap error [#369](vitejs/vite-plugin-react#369)
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 4.3.1 | 4.3.2 | ## [v4.3.2](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#432-2024-09-29) Ignore directive sourcemap error [#369](vitejs/vite-plugin-react#369)
|
I'm having a hard time understanding how a change on this plugin actually "fixed" an issue in I'd appreciate if someone could explain it to me 🙏 |
|
@csantos1113 This has been a known workaround on user land (such as the comment suggested in vitejs/vite#15012 (comment)), so this PR only made it applied automatically for react plugin users. It doesn't "fix" the underlying issue, but practically it solved the user-facing issue for Vite users. |
|
@hi-ogawa thanks for the quick response! Yes, that known workaround is what I had on my codebase as well. But the thing that intrigued me the most is how a vitest plugin solves the warning experience when building w/ vite? Is it being used under the hood somehow? |
|
I'm not sure what you mean by "vitest plugin" 🤔 This fix is added to vite react plugin. Also the warning is only coming from "vite build" (which involves rollup) and Vitest doesn't use vite build feature, so I don't think any similar warnings would've appeared for Vitest users. |
|
🙈 well... that would explain why I was having a hard time understanding the solution: I'm really sorry, I saw "vitejs" on the URLs and was always thinking on "vitest" instead. All good, and thanks for taking the time for bearing with me on my confusion! |
|
I am still seeing this warning on build I am using vite |
Description
The upstream issue was not resolved for a while, so adding a workaround.
close vitejs/vite#15012
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).