I might be missing something obvious here, but how am I supposed to import a third-party library that doesn't export anything.
I tried all of the following
import '../bower_components/asn1js/asn1'; import {ASN1} from '../bower_components/asn1js/asn1'; import ASN1 from '../bower_components/asn1js/asn1'; Neither of which worked.
If you take a look at the asn1.js file you can see in the end the following:
// export globals if (typeof module !== 'undefined') { module.exports = ASN1; } else { window.ASN1 = ASN1; } It seems that it is trying to export itself. I'm not familiar with this so could you explain me:
- What decides whether module is undefined? where should it be defined?
- If it is undefined or api doesn't use export, how can I import/use it?