cevek / ttypescript

Over TypeScript tool to use custom transformers in the tsconfig.json
1.53k stars 56 forks source link

parcel plugin not respecting "extends" keyword #53

Closed andykais closed 4 years ago

andykais commented 5 years ago

I have tsconfig files in a folder tsconfig/. I added a toplevel tsconfig.json file with the contents

{
  "extends": "./tsconfig/tsconfig.json"
}

so my project directory looks like so:

src/
tsconfig/
  tsconfig.json
  tsconfig.declarations.json
tsconfig.json
package.json

I created this file specifically so this plugin can find my nested configs. Unfortunately it does not seem to notice the tsconfigs in the tsconfig/ folder. I know it does not because I have tried leaving an invalid json file in tsconfig/tsconfig.json and parcel still builds without issue. On a related note, if I could specify the location of my tsconfig file like I can with ttsc, I could avoid these extra steps.

cevek commented 5 years ago

Yeah, the problem is here https://github.com/parcel-bundler/parcel/blob/master/packages/core/parcel-bundler/src/assets/TypeScriptAsset.js#L37

parcel just uses tsconfig.compilerOptions without try to parse this config by typescript internal tools which should normalize config by reading extends and etc

andykais commented 5 years ago

ah, good to know. Is there an issue already open in parcel-bundler?

cevek commented 5 years ago

So, I don't see anything

andykais commented 5 years ago

actually it looks like a bug has already been reported https://github.com/parcel-bundler/parcel/issues/2856

cevek commented 4 years ago

Fixed in parcel@2