Open onlyfortesting opened 4 years ago
seems like an aliasing bug where next/dynamic
is getting a copy of react. I haven't tried this yet, will have to in order to see what's going on.
@developit @onlyfortesting You're better off reporting that to the next team since it doesn't work on the official next template either.
As for why it works on the default import is as the file is executed as a node module before reading the component , thus breaking on the normal.
Changing it to this
const error = ()=>{
throw new Error("test");
}
const Test = () => {
error();
return <div>hello</div>;
};
export default Test;
Gave me the requested error.
Though if you are seeing this happen in a project, please create a similar snippet, would help in debugging
Current Behavior
no page error, no console output, no term output.
Steps to Reproduce (for bugs)