-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Labels
Description
Typescript, unlike babel, differentiates between default and "whole" exports, this is.
import * as X from 'X'; = require('X')
import X from 'X'; = require('X').default;
whereas in babel
import X from 'X'; = require('X').default || require('X');
the thing is that the TS typings say that the function is actually on require('X').default, but it is actually in require('X') due to this last line in the generated index.js:
module.exports = exports['default'];
something to do most probably with how rollup does it.
could the typings be fixed? or if not at least then make it actually export the function on default :)