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.
What about `require('foo')`? Only seems appropriate when using inline requires. The functionality I described is basically automatically turning `import` into `import type` because TS doesn't support it.
-
-
If the module doesn’t show up after stripping types it won’t be included.
-
I mean, if you have files like this: a.js: require('./b.js'); b.js: console.log('hello'); Then bundling a.js should still produce a console.log. Does it only do it for bound requires?
- 1 more reply
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 