`import * as _Br from 'tst-reflect'` is added to every compiled file
avin-kavish opened this issue · 4 comments
avin-kavish commented
and not just the ones that use it
avin-kavish commented
This is actually problem for front-end code, affects bundle size.
Hookyns commented
This is added to each root/entry file.
If you configure your tsconfig like include: "**/*.ts"
, all the matched files are meant as root files. Each of that file can be root/entry file. So it is important to add that to each such file.
If you change the include to "index.ts"
, TS knows this is only root/entry file, and it will follow imports to find all other application files.
I can add new option to config: rootFiles: string[]
.
avin-kavish commented
So it is important to add that to each such file.
why? The library is only needed when used
Hookyns commented
Fixed in v1. Not in the current version.