Rome detects imports that are only used in TS or Flow types and marks them when analyzing dependencies. These imports will not effect module order or be included in a bundle. Files that contain only types will never need to be included.
-
-
Makes sense, relying on the side effects of a module that was imported just for its types is quite an edge case
i was just curious if Rome did some kind of pre-analysis of dependencies before building the graph -
There's a step called analyzeDependencies which is just a method in the Rome compiler that does some single-file static analysis. It's super cachable and includes stuff like if it uses top level await, where are imports used for the first time (cycle detection) etc
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 