fix(es): Fix bugs (#2403)

swc:
 - Ensure that #2114 is fixed.
 - Ensure that #2310 is fixed.
This commit is contained in:
Donny/강동윤 2021-10-12 01:27:57 +09:00 committed by GitHub
parent 4ad25d2155
commit 6366d05fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,8 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true
}
}
}

View File

@ -0,0 +1,5 @@
import React from "react";
export module Test {
export const content = <div>Content</div>;
}

View File

@ -0,0 +1,6 @@
import React from "react";
export var Test;
(function(Test) {
Test.content = /*#__PURE__*/ React.createElement("div", null, "Content");
})(Test || (Test = {
}));

View File

@ -0,0 +1,5 @@
namespace A {
export const Foo = () => {
return <div></div>;
};
}

View File

@ -0,0 +1,7 @@
var A;
(function(A) {
A.Foo = function() {
return(/*#__PURE__*/ React.createElement("div", null));
};
})(A || (A = {
}));