From 639d81393355dcd7b7ebc27dcce06b3d765cefa3 Mon Sep 17 00:00:00 2001 From: ChenX Date: Tue, 2 Jul 2019 23:11:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20ts-optchain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + tsconfig.json | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ac8af6854..2ec3856e7 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "react-rnd2": "^1.0.1", "stats.js": "^0.17.0", "three": "^0.106.1", + "ts-optchain": "^0.1.7", "xaop": "^1.3.2" }, "jest": { diff --git a/tsconfig.json b/tsconfig.json index e47326c3d..683bcda94 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,12 @@ "jest" ], "jsx": "react", - "experimentalDecorators": true + "experimentalDecorators": true, + "plugins": [ + { + "transform": "ts-optchain/transform" + }, + ] }, "include": [ "./src/**/*",