Skip to content
New issue

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

Support for ESM and Typescript2.0 ? #304

Open
ShinTorisawa opened this issue Jun 30, 2023 · 0 comments
Open

Support for ESM and Typescript2.0 ? #304

ShinTorisawa opened this issue Jun 30, 2023 · 0 comments

Comments

@ShinTorisawa
Copy link

ShinTorisawa commented Jun 30, 2023

Hi,

Could you please tell me the correct way to import panzoom version 9.4.3 in ESM format using TypeScript 2.0?
I thought that panzoom only supports CommonJS format and not ESM format, because in the package.json file, it is written "main": "index.js" and there is no "module" field.

However, I am confused because there is a post here that says import panzoom from 'panzoom' works, which is an ESM format import method. Does panzoom officially support ESM format?

After much trial and error, I found that unless I add the code export default panzoom; to the end of panzoom/dist/panzoom*.js, it does not work with the ESM format import statement.

So I thought it was strange and came to ask the question at the beginning.

Moreover, I read #108 but it didn’t help

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant