From e71790241462dc14dac28d5d4d499f82c0c3d393 Mon Sep 17 00:00:00 2001 From: nvms Date: Wed, 9 Oct 2024 18:11:22 -0400 Subject: [PATCH] change init --- internal/esr/init.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/esr/init.go b/internal/esr/init.go index d3c3d23..834e043 100644 --- a/internal/esr/init.go +++ b/internal/esr/init.go @@ -44,8 +44,8 @@ run: runtime: bun sourcemap: false -jsx: transform -jsxFactory: h +jsx: automatic +jsxFactory: React.createElement ` func CreateDefaultPackageJson() string { @@ -117,10 +117,10 @@ func InitProject() { tsconfigJsonPath := filepath.Join(cwd, "tsconfig.json") if err := os.WriteFile(tsconfigJsonPath, []byte(`{ - "compilerOptions": { - "jsx": "preserve", - "jsxFactory": "h" - } + "compilerOptions": { + "module": "ES2022", + "target": "ESNext" + } }`), 0644); err != nil { Die("failed to write tsconfig.json: %v", err) }