Skip to content

Typescript React Component dynamically compiled works in Dev but not production #2564

Discussion options

You must be logged in to vote

I have come to the realisation that this is probably not going to work how I wanted it to.

Even my simple component still requires React/jsx-runtime to compile and obviosuly my idea was not to have a simple react component but something that probably has lot of dependancies.

import { jsx as _jsx } from "react/jsx-runtime";
function CustomComponent() {
    return _jsx("div", { children: "This is from a Custom Component called [Custom Component]" });
}
export default CustomComponent;

Chris

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@ccrowe-trimble
Comment options

@remcohaszing
Comment options

@ccrowe-trimble
Comment options

@remcohaszing
Comment options

@wooorm
Comment options

Comment options

You must be logged in to vote
1 reply
@ccrowe-trimble
Comment options

Answer selected by ccrowe-trimble
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants