fix(compiler): JSX compilation and provide better error message (#6300)

This commit is contained in:
Bartek Iwańczuk 2020-06-15 17:53:05 +02:00 committed by GitHub
parent 0ffc99a61d
commit b1893e65f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 5 deletions

View file

@ -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",

View file

@ -0,0 +1,11 @@
const React = {
createElement() {}
}
export default function app() {
return (
<div>
<h2>asdf</h2>
</div>
);
}

View file

@ -0,0 +1,3 @@
import app from "./jsx_import_from_ts.App.jsx";
console.log(app);

View file

@ -0,0 +1 @@
[Function: app]