mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 15:47:08 +00:00
Update TS version and code-split deepslate
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { useEffect, useMemo, useState } from 'preact/hooks'
|
||||
import { mapStackTrace } from 'sourcemapped-stacktrace'
|
||||
import { Octicon } from './Octicon'
|
||||
|
||||
type ErrorPanelProps = {
|
||||
@@ -16,11 +15,13 @@ export function ErrorPanel({ error, onDismiss }: ErrorPanelProps) {
|
||||
return line.replace(/^(\s+)at (?:async )?(https?:.*)/, '$1at ($2)')
|
||||
})
|
||||
setStack(stack.join('\n'))
|
||||
mapStackTrace(stack.join('\n'), (mapped) => {
|
||||
const mappedStack = mapped.map(line => {
|
||||
return line.replace(/..\/..\/src\//, 'src/')
|
||||
}).join('\n')
|
||||
setStack(mappedStack)
|
||||
import('sourcemapped-stacktrace').then(({ mapStackTrace }) => {
|
||||
mapStackTrace(stack.join('\n'), (mapped) => {
|
||||
const mappedStack = mapped.map(line => {
|
||||
return line.replace(/..\/..\/src\//, 'src/')
|
||||
}).join('\n')
|
||||
setStack(mappedStack)
|
||||
})
|
||||
})
|
||||
}
|
||||
}, [error])
|
||||
|
||||
Reference in New Issue
Block a user