Smaller bundles. Decreased risk for module cycles. Better dependency graph and bundle analysis.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Nice! What happens if a module only use the types from another module that has side effects? Is this detected and taken into account? When
@mjesun and me were exploring to do tree shaking in metro these kind of things were really challenging to do in a performant way -
The implementation was driven by TypeScript which doesn't have 'import type'. It resulted in a bunch of unfixable module cycles inside Rome (I'm converting it from Flow). Whether a module is marked as "only for types" isn't effected by anything about the file itself.
- 5 more replies
New conversation -
-
-
What happens if you import a class and use it a type ?
-
Do you have a code example?
- 3 more replies
New conversation -
-
-
Literally just ran into this problem at work yesterday. I'm planning on forking transform-strip-flow-types to get around it. Has anyone else already done this?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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 