You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was hoping to use etsc as a drop-in replacement for tsc, but the blocker I've run into is that our project has resolveJsonModule: true and imports .json files, which are not handled well.
As it stands, the transpiled files in dist refer to a non-existent ./whatever.json. Digging through tsc's getFileNames(), I noticed I could set "include": ["src", "src/**/*.json"] in tsconfig.json to force .json files to be processed, although then esbuild outputs whatever.js, which is still broken. Maybe I could copy .json files into dist in the postbuild hook like non-TypeScript assets, but it seems like I shouldn't have to, especially when tsc doesn't require that.
So, is the non-handling of imported .json files a bug? If not, what's the recommended way to get it working?
The text was updated successfully, but these errors were encountered:
I was hoping to use
etsc
as a drop-in replacement fortsc
, but the blocker I've run into is that our project hasresolveJsonModule: true
and imports.json
files, which are not handled well.As it stands, the transpiled files in
dist
refer to a non-existent./whatever.json
. Digging throughtsc
'sgetFileNames()
, I noticed I could set"include": ["src", "src/**/*.json"]
intsconfig.json
to force.json
files to be processed, although then esbuild outputswhatever.js
, which is still broken. Maybe I could copy.json
files intodist
in the postbuild hook like non-TypeScript assets, but it seems like I shouldn't have to, especially whentsc
doesn't require that.So, is the non-handling of imported
.json
files a bug? If not, what's the recommended way to get it working?The text was updated successfully, but these errors were encountered: