Closed littledivy closed 4 years ago
I'm taking a look at this. To understand the idea:
BuildOptions
Where should I look at for the dev mode? I guess it's in TypeCheck()
, but I'm not sure what you expect it to do
@layderv Yup you're right about the bundler and we'd want that for now. As far as the typechecker is concerned, i'm planning on a re-write to make things much more streamlined.
EDIT: tracking issue for typechecker #67
@littledivy if I understand, this is it: https://github.com/elsaland/elsa/commit/fd262784ae2e23c674ff66ef42158a1f9ce8c81d
It tries to find tsconfig.json in the same folder as the input file. I could add a command line option instead of inferring the filepath.
My doubt is that it doesn't look to me like that Build
function is doing anything with it. Did I understand correctly that is the right place?
I created a simple tsconfig.json:
{
"compilerOptions": {
"target": "es1",
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true
}
}
It didn't error out, it bundled my typescript source file. It does check that the file exists.
In this case the problem seems to be in esbuild
. I'll wait for your thoughts.
@littledivy if it's as described above, I think you can close this issue
Yes, esbuild is a bundler and not a compiler so it won't typecheck the code (reason that we have typescript compilation at dev mode in the first place) so it will only take the target and module fields from the tsconfig json.
I'll close this issue in favour of #67
Respect an existing tsconfig.json both at bundling and typechecking at dev mode.