fix: hot can't do that
This commit is contained in:
parent
b1a42934df
commit
e182c91d4c
|
@ -1,16 +1,16 @@
|
|||
import React from 'react';
|
||||
import {render} from 'react-dom';
|
||||
import {hot} from 'react-hot-loader';
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const $$latus = {
|
||||
hooks: {
|
||||
'@latus/http/up': (plugins) => {
|
||||
const modules = plugins.invoke('@latus/react/components');
|
||||
const Components = plugins.invoke('@latus/react/components');
|
||||
const heated = React.createElement(
|
||||
hot(module)(React.Fragment),
|
||||
React.Fragment,
|
||||
{},
|
||||
Object.entries(modules).map(([key, module]) => React.createElement(module, {key})),
|
||||
Object.entries(Components)
|
||||
.map(([key, Component]) => React.createElement(Component, {key})),
|
||||
);
|
||||
return render(heated, window.document.getElementById('root'));
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user