Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tsconfig] not support scope base config #269

Closed
bluelovers opened this issue Jul 18, 2020 · 3 comments
Closed

[tsconfig] not support scope base config #269

bluelovers opened this issue Jul 18, 2020 · 3 comments

Comments

@bluelovers
Copy link

{
  "extends": "@bluelovers/tsconfig/esm/mapfile.json",
  "compilerOptions": {
    "jsx": "react",
    "noEmit": false
  }
}
../../tsconfig.json:2:13: warning: Cannot find base config file "@bluelovers/tsconfig/sourcemap/mapfile.json"
  "extends": "@bluelovers/tsconfig/sourcemap/mapfile.json"

@evanw evanw closed this as completed in 5f37fe7 Jul 19, 2020
@bluelovers
Copy link
Author

@evanw still not support

G:\Users\The Project\temp\p1>npx esbuild --version
0.6.4

G:\Users\The Project\temp\p1>npx esbuild index.ts --minify
../tsconfig.json:2:13: warning: Cannot find base config file "@bluelovers/tsconfig/sourcemap/mapfile.json"
  "extends": "@bluelovers/tsconfig/sourcemap/mapfile.json"
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var POSTAG;(function(a){a[a.BAD=2147483648]="BAD",a[a.D_A=1073741824]="D_A",a[a.D_B=536870912]="D_B",a[a.D_C=268435456]="D_C",a[a.D_D=134217728]="D_D",a[a.D_E=67108864]="D_E",a[a.D_F=33554432]
="D_F",a[a.D_I=16777216]="D_I",a[a.D_L=8388608]="D_L",a[a.A_M=4194304]="A_M",a[a.D_MQ=2097152]="D_MQ",a[a.D_N=1048576]="D_N",a[a.D_O=524288]="D_O",a[a.D_P=262144]="D_P",a[a.A_Q=131072]="A_Q",a[a.D_R=
65536]="D_R",a[a.D_S=32768]="D_S",a[a.D_T=16384]="D_T",a[a.D_U=8192]="D_U",a[a.D_V=4096]="D_V",a[a.D_W=2048]="D_W",a[a.D_X=1024]="D_X",a[a.D_Y=512]="D_Y",a[a.D_Z=256]="D_Z",a[a.A_NR=128]="A_NR",a[a.A
_NS=64]="A_NS",a[a.A_NT=32]="A_NT",a[a.A_NX=16]="A_NX",a[a.A_NZ=8]="A_NZ",a[a.D_ZH=4]="D_ZH",a[a.D_K=2]="D_K",a[a.URL=1]="URL",a[a.UNK=0]="UNK"})(POSTAG||(POSTAG={}));let b=[];b.forEach(function(a){l
et c=a.toLowerCase();POSTAG[c]??=POSTAG[a]});
1 warning

test-esbuild-ts.zip

@evanw
Copy link
Owner

evanw commented Jul 20, 2020

I just tried this and it worked for me without generating any warnings. I followed these steps:

$ curl -LO https://github.com/evanw/esbuild/files/4944771/test-esbuild-ts.zip
$ unzip test-esbuild-ts.zip
$ mv tsconfig.json.tpl tsconfig.json
$ yarn
$ npx esbuild --version
0.6.4
$ npx esbuild index.ts --minify
export var POSTAG;(function(a){a[a.BAD=2147483648]="BAD",a[a.D_A=1073741824]="D_A",a[a.D_B=536870912]="D_B",a[a.D_C=268435456]="D_C",a[a.D_D=134217728]="D_D",a[a.D_E=67108864]="D_E",a[a.D_F=33554432]="D_F",a[a.D_I=16777216]="D_I",a[a.D_L=8388608]="D_L",a[a.A_M=4194304]="A_M",a[a.D_MQ=2097152]="D_MQ",a[a.D_N=1048576]="D_N",a[a.D_O=524288]="D_O",a[a.D_P=262144]="D_P",a[a.A_Q=131072]="A_Q",a[a.D_R=65536]="D_R",a[a.D_S=32768]="D_S",a[a.D_T=16384]="D_T",a[a.D_U=8192]="D_U",a[a.D_V=4096]="D_V",a[a.D_W=2048]="D_W",a[a.D_X=1024]="D_X",a[a.D_Y=512]="D_Y",a[a.D_Z=256]="D_Z",a[a.A_NR=128]="A_NR",a[a.A_NS=64]="A_NS",a[a.A_NT=32]="A_NT",a[a.A_NX=16]="A_NX",a[a.A_NZ=8]="A_NZ",a[a.D_ZH=4]="D_ZH",a[a.D_K=2]="D_K",a[a.URL=1]="URL",a[a.UNK=0]="UNK"})(POSTAG||(POSTAG={}));let b=[];b.forEach(function(a){let c=a.toLowerCase();POSTAG[c]??=POSTAG[a]});

I also tried the equivalent steps on Windows and it also worked there without a warning. Are there any additional steps to reproduce this issue? Does this issue still happen if you delete the node_modules folder and then run yarn again?

@bluelovers
Copy link
Author

looks like this happen because it search all tsconfig up from current dir

tsconfig.json (A) <== should not parse this

  • test-esbuild-ts
    • tsconfig.json (B) <== when exists, stop search parent
    • index.ts

when run esbuild in test-esbuild-ts
it should stop search up when found first one tsconfig.json (B)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants