We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to import as per the library docs import extractDomain from 'extract-domain'; And then use it like
import extractDomain from 'extract-domain';
const urls = await extractDomain("https://www.mydomain", { tld: true, });
but it throws extractDomain.default is not a function
Also tried import * as extractDomain from 'extract-domain'; And then use it like
import * as extractDomain from 'extract-domain';
const urls = await extractDomain.default("https://www.mydomain", { tld: true, });
But got the same error
The only way I was able to make it work was by doing const extractDomain = require('extract-domain'); And then use like in the first case
const extractDomain = require('extract-domain');
I am using typescript 5.1.6
The text was updated successfully, but these errors were encountered:
I created this repo reproduce and this stackblitz to reproduce
Sorry, something went wrong.
Thanks. This is strange behaviour. I will look into this!
From version 5, it will support ESM only.
No branches or pull requests
I tried to import as per the library docs
import extractDomain from 'extract-domain';
And then use it like
but it throws
extractDomain.default is not a function
Also tried
import * as extractDomain from 'extract-domain';
And then use it like
But got the same error
The only way I was able to make it work was by doing
const extractDomain = require('extract-domain');
And then use like in the first case
I am using typescript 5.1.6
The text was updated successfully, but these errors were encountered: