fusion-cli
fusion-cli copied to clipboard
Add a tree shaking test that involves the use of Flow types
As part of the investigation into looking into WPT-2994 this PR adds a new test to ensure that imports/exports that include Flow types are properly stripped and tree shaken.
I was having trouble reproducing whether code was leaking into the browser due to Flow imports:
e.g.
import type {AType} from ... // no leak
import {B} from ...
vs.
import {type AType, B} from ... // potential leak
Not entirely sure why, but tree splitting seems to be failing for node module dependency imports as a separate concern.