Skip to content

lineNumber error for __source prop #235

@zjxxxxxxxxx

Description

@zjxxxxxxxxx

Describe the bug

In development, lineNumber for the __source prop provided by babel-plugin-transform-react-jsx-source is wrong.

1697167585043

I have solved this issue locally and I can submit a pr for this issue.

Reproduction

https://stackblitz.com/edit/vitejs-vite-nje3zq?file=src%2FApp.tsx&terminal=dev

Steps to reproduce

Wait for the project to run automatically to see the requests from App.tsx

System Info

System:
    OS: macOS 14.0
    CPU: (12) arm64 Apple M2 Pro
    Memory: 3.39 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.19.1 - ~/.nvm/versions/node/v16.19.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.1/bin/yarn
    npm: 9.6.2 - ~/.nvm/versions/node/v16.19.1/bin/npm
    pnpm: 8.6.11 - ~/.nvm/versions/node/v16.19.1/bin/pnpm
  Browsers:
    Chrome: 117.0.5938.132
    Safari: 17.0
  npmPackages:
    @vitejs/plugin-legacy: ^4.0.2 => 4.1.1 
    @vitejs/plugin-react: ^4.0.1 => 4.1.0 
    vite: ^4.3.9 => 4.4.11

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions