mirror of
https://github.com/fergalmoran/onearmy-community-platform.git
synced 2025-12-22 09:37:54 +00:00
fix: move dynamic import module fix to handler
This commit is contained in:
@@ -12,12 +12,6 @@ import { Pages } from './pages'
|
|||||||
export const App = observer(() => {
|
export const App = observer(() => {
|
||||||
const rootStore = useCommonStores()
|
const rootStore = useCommonStores()
|
||||||
|
|
||||||
// To handle when hosting deletes the assets from previous deployments
|
|
||||||
// https://vitejs.dev/guide/build#load-error-handling
|
|
||||||
window.addEventListener('vite:preloadError', () => {
|
|
||||||
window.location.reload()
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<rootStoreContext.Provider value={rootStore}>
|
<rootStoreContext.Provider value={rootStore}>
|
||||||
<ThemeProvider theme={rootStore.stores.themeStore.currentTheme.styles}>
|
<ThemeProvider theme={rootStore.stores.themeStore.currentTheme.styles}>
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ export const initErrorHandler = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// To handle when hosting deletes the assets from previous deployments
|
||||||
|
// https://vitejs.dev/guide/build#load-error-handling
|
||||||
|
window.addEventListener('vite:preloadError', () => {
|
||||||
|
window.location.reload()
|
||||||
|
})
|
||||||
|
|
||||||
// please check https://docs.sentry.io/error-reporting/configuration/?platform=javascript for options
|
// please check https://docs.sentry.io/error-reporting/configuration/?platform=javascript for options
|
||||||
Sentry.init(SENTRY_CONFIG)
|
Sentry.init(SENTRY_CONFIG)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user