Closed Gozala closed 7 years ago
Flow interfaces are not runtime values, they are types, so the appropriate way to import them is with import type
, otherwise Rollup will look for a runtime value that does not exist
This problem will appear whenever you attempt to import a value that is not defined by that module
In flow you can import interfaces like
import {MyInterface} from "module"
those do not get stripped which causes rollup to fail withError: 'MyInterface' is not exported by ...
. There is a way to workaround this by usingimport type {MyInterface}
instead, but unfortunately not all of the code is under our control & there seems to be no other way around it as far as I can tell.