-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Description
Describe the bug
When including Typescript, the generated source map for each file maps it the file to input.ts. This causes problems with breakpoints, as well as logging locations. Additionally, during loading in the Chrome debugger, you can sometimes see all Typescript files flash as input.ts.
Reproduction
$ npx create-vite-app
$ npm i
$ echo "console.log('test')" > test.ts
$ echo "import './test'" >> main.js
$ npm run dev$ curl 'http://localhost:3000/test.ts'
> console.log("test");
>
>
> //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiL2lucHV0LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zb2xlLmxvZygndGVzdCcpXG4iXSwKICAibWFwcGluZ3MiOiAiQUFBQSxRQUFRLElBQUk7IiwKICAibmFtZXMiOiBbXQp9Cg==The sourcemap decodes to:
{
"version": 3,
"sources": ["/input.ts"],
"sourcesContent": ["console.log('test')\n"],
"mappings": "AAAA,QAAQ,IAAI;",
"names": []
}System Info
- required
viteversion: 0.14.4, 0.10.x - required Operating System: Ubuntu, Windows, WSL
- required Node version: 12.11.1, 12.13.1
- Optional:
- npm/yarn version: 6.11.3, 6.14.5
- Installed
vueversion: 3.0.0-beta.10 - Installed
@vue/compiler-sfcversion: 3.0.0-beta.10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels