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:
@@ -89,7 +89,12 @@ export function registerStaticFile(prepared) {
|
||||
|
||||
if (isDev) {
|
||||
code = `import "preact/debug";
|
||||
import { setErrorInterceptor as internalErrorIntercept } from "fresh/internal";
|
||||
${code}
|
||||
|
||||
export function setErrorInterceptor(fn) {
|
||||
internalErrorIntercept(app, fn);
|
||||
}
|
||||
if (import.meta.hot) import.meta.hot.accept();`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user