mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
fix(compiler): JSX compilation and provide better error message (#6300)
This commit is contained in:
parent
0ffc99a61d
commit
b1893e65f2
5 changed files with 76 additions and 5 deletions
|
@ -2015,6 +2015,11 @@ itest!(ts_import_from_js {
|
|||
http_server: true,
|
||||
});
|
||||
|
||||
itest!(jsx_import_from_ts {
|
||||
args: "run --quiet --reload jsx_import_from_ts.ts",
|
||||
output: "jsx_import_from_ts.ts.out",
|
||||
});
|
||||
|
||||
itest!(single_compile_with_reload {
|
||||
args: "run --reload --allow-read single_compile_with_reload.ts",
|
||||
output: "single_compile_with_reload.ts.out",
|
||||
|
|
11
cli/tests/jsx_import_from_ts.App.jsx
Normal file
11
cli/tests/jsx_import_from_ts.App.jsx
Normal file
|
@ -0,0 +1,11 @@
|
|||
const React = {
|
||||
createElement() {}
|
||||
}
|
||||
|
||||
export default function app() {
|
||||
return (
|
||||
<div>
|
||||
<h2>asdf</h2>
|
||||
</div>
|
||||
);
|
||||
}
|
3
cli/tests/jsx_import_from_ts.ts
Normal file
3
cli/tests/jsx_import_from_ts.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import app from "./jsx_import_from_ts.App.jsx";
|
||||
|
||||
console.log(app);
|
1
cli/tests/jsx_import_from_ts.ts.out
Normal file
1
cli/tests/jsx_import_from_ts.ts.out
Normal file
|
@ -0,0 +1 @@
|
|||
[Function: app]
|
Loading…
Add table
Add a link
Reference in a new issue