-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Description
Actually the problem is not with typescript - the problem is with rollup.
https://unpkg.com/[email protected]/dist/memoize-one.cjs.js contains
module.exports = index;
which should be imported as import * as memoizeOne
while https://unpkg.com/[email protected]/dist/memoize-one.esm.js contains
export default index;
which should be imported as import memoizeOne
Result - the code for nodejs (~jest) require one behaviour, while the code for webpack(uses esm bundle) requires another.
It is not a problem for js/flow, as long babel is doing some around magic default imports, but typescript is quite strict about it.
The cjs bundle should match esm bundle.
(and fixing this would introduce a breaking change)
billiegoose, hlolli, nihaux, AndreiCalazans, paibamboo and 5 more
Metadata
Metadata
Assignees
Labels
No labels