fix(vite): source mapping locations (#3624)
Mappings were wrong for a few reasons: - Missing source map generation in one babel transform - setting `compact: false` causes vite to generate incorrect mappings in `vite:import-analysis` - stack traces need to be mapped by vite Fixes https://github.com/denoland/fresh/issues/3609
This commit is contained in:
@@ -523,3 +523,14 @@ Deno.test({
|
||||
sanitizeOps: false,
|
||||
sanitizeResources: false,
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "vite dev - source mapped stack traces",
|
||||
fn: async () => {
|
||||
const res = await fetch(`${demoServer.address()}/tests/throw`);
|
||||
const text = await res.text();
|
||||
expect(text).toContain("throw.tsx:5:11");
|
||||
},
|
||||
sanitizeOps: false,
|
||||
sanitizeResources: false,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user