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:
@@ -0,0 +1,9 @@
|
||||
import { define } from "../utils.ts";
|
||||
|
||||
export default define.page((props) => {
|
||||
if (props.error instanceof Error) {
|
||||
return <pre id="err">{String(props.error?.stack)}</pre>;
|
||||
}
|
||||
|
||||
return <pre id="err">{String(props.error)}</pre>;
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import { define } from "../../utils.ts";
|
||||
|
||||
export const handler = define.handlers({
|
||||
GET() {
|
||||
throw new Error("FAIL");
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createDefine } from "@fresh/core";
|
||||
|
||||
// deno-lint-ignore no-explicit-any
|
||||
export const define = createDefine<any>();
|
||||
Reference in New Issue
Block a user