fusion-cli icon indicating copy to clipboard operation
fusion-cli copied to clipboard

Add a tree shaking test that involves the use of Flow types

Open alxmyth opened this issue 6 years ago • 1 comments

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.

alxmyth avatar May 06 '19 22:05 alxmyth

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.

alxmyth avatar May 06 '19 22:05 alxmyth