From 9686a8803e311d532c37fe919e0684feca91a04f Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Mon, 22 Apr 2024 17:07:36 +0200 Subject: feat: add jsx precompile skip element option (#23457) This PR wires up a new `jsxPrecompileSkipElements` option in `compilerOptions` that can be used to exempt a list of elements from being precompiled with the `precompile` JSX transform. --- tests/testdata/run/jsx_precompile/skip.out | 3 +++ tests/testdata/run/jsx_precompile/skip.tsx | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/testdata/run/jsx_precompile/skip.out create mode 100644 tests/testdata/run/jsx_precompile/skip.tsx (limited to 'tests/testdata/run') diff --git a/tests/testdata/run/jsx_precompile/skip.out b/tests/testdata/run/jsx_precompile/skip.out new file mode 100644 index 000000000..a32b616f0 --- /dev/null +++ b/tests/testdata/run/jsx_precompile/skip.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/jsx/jsx-precompile/index.ts +Check file:///[WILDCARD]/run/jsx_precompile/skip.tsx +imported http://localhost:4545/jsx/jsx-precompile/index.ts diff --git a/tests/testdata/run/jsx_precompile/skip.tsx b/tests/testdata/run/jsx_precompile/skip.tsx new file mode 100644 index 000000000..49bc4e2b7 --- /dev/null +++ b/tests/testdata/run/jsx_precompile/skip.tsx @@ -0,0 +1,9 @@ +export function A() { + return ( +
+ foo +

hello

+ +
+ ); +} -- cgit v1.2.3