mirror of
https://github.com/c8r/x0.git
synced 2024-09-11 13:45:52 +03:00
Simplify hmr setup
This commit is contained in:
parent
9abca789a0
commit
cb8d582bcf
@ -175,11 +175,6 @@ if (IS_CLIENT) {
|
||||
}
|
||||
|
||||
if (IS_CLIENT && module.hot) {
|
||||
module.hot.accept(req.id, async () => {
|
||||
const next = require.context(DIRNAME, false, /\.(js|mdx|jsx)$/)
|
||||
const components = getComponents(next)
|
||||
const routes = await getRoutes(components)
|
||||
app.setState({ routes })
|
||||
})
|
||||
module.hot.accept()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user