I'd love it if undefined imports would cause a build/runtime exception rather than causing a timebomb to find later on. Is this possible to implement?
import Foo, { bar} from './foo';
turns into
import Foo, { bar } from './foo';
if(typeof(Foo) === 'undefined') {
throw new TypeError(`'Foo' default import from './foo' is undefined`);
}
if(typeof(bar) === 'undefined') {
throw new TypeError(`'bar' import from './foo' is undefined`);
}
I'd love it if undefined imports would cause a build/runtime exception rather than causing a timebomb to find later on. Is this possible to implement?
turns into