comatory
Cannot resolve React with hono/jsx
My application is getting errors when trying to use
jsx
. My project uses monorepo structure managed by Nx. The way it's managed (default) is to have three tsconfig.*.json
files in each folder:
- tsconfig.json
which references two other configs (see below) via project references. It extends root TS config which contains its own compilerOptions
- tsconfig.lib.json
settings for production source code, this is where you usually put compilerOptions
specific settings and configuration relevant to source code for production (excludes tests etc)
- tsconfig.spec.json
settings for testing code, this means files ending with *.spec.ts{x}
are included by default
My issue is that when trying to adjust compilerOptions
as recommended in docs:
Does not work when it's added to tsconfig.lib.json
file, which is recommended approach for Nx monorepos. Instead, it must be added to tsconfig.json
. This is less than ideal because it is quite possible my test code won't need JSX transformation and I'd like to keep default structure.
Is it possible that hono/jsx
is somehow hardcoded to only look for tsconfig.json
specifically?9 replies