-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
Description
I've pulled this into my project from NPM and I'm trying to import it into a webcomponent but
import { humanizeDuration } from 'humanize-duration/humanize-duration.js'; gives an error that there is not export named humanizeDuration
So I tried
import 'humanize-duration/humanize-duration.js'; but this gives an error Uncaught (in promise) TypeError: Cannot set property 'humanizeDuration' of undefined from the following line 1118 code
humanizeDuration.humanizer = humanizer;
if (typeof define === 'function' && define.amd) {
define(function () {
return humanizeDuration;
});
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = humanizeDuration;
} else {
this.humanizeDuration = humanizeDuration;
}
})(); // eslint-disable-line semi
basically the last line of real code in the above snippet.
Any ideas how to get around it?
rokerkony and bufke