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 use npm package within TypeScript and there are no default exports. Can you add a module prop to package.json?
module
The text was updated successfully, but these errors were encountered:
module field point to a module that has ES2015 module syntax. We don't have this module syntax, how can it help you?
Sorry, something went wrong.
@Trufi How to use the npm package? There are no any exports.
We have main field, which points to a bundle with commonjs module syntax.
main
import DG from '2gis-maps'; should works with ES2015 module syntax.
import DG from '2gis-maps';
But If you use TypeScript, you must add typings for any package. We have no own typings, and you have to do it yourself.
For example, you can create project.d.ts and add:
project.d.ts
declare module "2gis-maps" { const _: any; export default _; }
No branches or pull requests
I use npm package within TypeScript and there are no default exports.
Can you add a
module
prop to package.json?The text was updated successfully, but these errors were encountered: