We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deno compile
deno compile seems to ignore JSX settings in deno.json that are honored by deno run.
deno.json
deno run
For example:
// deno.json { "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "custom" }, "importMap": "./import.json" }
// import.json { "imports": { "custom/jsx-runtime": "./jsx-runtime.ts" } }
// jsx-runtime.ts export declare namespace JSX { interface IntrinsicElements { test: {}; } } export function jsx() { console.log("custom JSX factory!"); return 1; }
// main.tsx const x = <test />;
deno run works as expected:
> deno run main.tsx custom JSX factory!
But deno compile doesn't seem to honor the JSX settings:
> deno compile --output repro main.tsx > ./repro error: Uncaught ReferenceError: React is not defined const x = /*#__PURE__*/ React.createElement("test", null);
The text was updated successfully, but these errors were encountered:
A Fresh user just ran into this. @dsherret Is that a difficult fix?
Sorry, something went wrong.
I believe this was fixed by #22164(edit: actually, #22521), in 1.41.0.
I don't think it was fixed by that one, but yeah this seems to be working now.
No branches or pull requests
deno compile
seems to ignore JSX settings indeno.json
that are honored bydeno run
.For example:
deno run
works as expected:But
deno compile
doesn't seem to honor the JSX settings:The text was updated successfully, but these errors were encountered: