You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vite create broken sourcemap file.
I reproduce this situation on clear vite bolerplate project use the follow command: pnpm create vite my-react-app --template react-ts
Than, I add two files with one hook:
hookBad.ts
hookGood.ts
And call both hook in App.tsx
Then, debug hookBad.ts sourcemap with incorrect line
Then, debug hookGood.ts sourcemap with correct line
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
Vite create broken sourcemap file.
I reproduce this situation on clear vite bolerplate project use the follow command:
pnpm create vite my-react-app --template react-ts
Than, I add two files with one hook:
And call both hook in App.tsx
Then, debug hookBad.ts sourcemap with incorrect line
Then, debug hookGood.ts sourcemap with correct line
The difference is import react as multiline.
Bad sourcemap
Good sourcemap
Reproduction
https://github.com/SenyaMur/vite-reatct-bad-hook
Steps to reproduce
clone repo https://github.com/SenyaMur/vite-reatct-bad-hook
pnpm i
pnpm dev
launch site in browser (for example: Chrome)
open DevTools and refresh site (press F5)
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: