From 7c9ad7edd65052f8a1f112786ebd7e7c529f8226 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Fri, 27 Aug 2021 22:09:21 +0200 Subject: [PATCH] :wrench: Add `onlyRemoveTypeImports` on the TS preset --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 52e52ed..a517277 100644 --- a/src/index.ts +++ b/src/index.ts @@ -187,7 +187,8 @@ export default function solidPlugin(options: Partial = {}): Plugin { }; if (id.includes('tsx')) { - opts.presets.push(ts); + // The `onlyRemoveTypeImports` prevent directives from failing + opts.presets.push([ts, { onlyRemoveTypeImports: true }]); } // Default value for babel user options