You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: