1
1
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:
Brent Jackson 2018-05-25 10:40:05 -04:00
parent 9abca789a0
commit cb8d582bcf

View File

@ -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()
}