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

Module 'html2canvas' is not ESM #3206

Open
1 of 2 tasks
kevinmendozav opened this issue Oct 7, 2024 · 0 comments
Open
1 of 2 tasks

Module 'html2canvas' is not ESM #3206

kevinmendozav opened this issue Oct 7, 2024 · 0 comments

Comments

@kevinmendozav
Copy link

Please follow the general troubleshooting steps first:

  • You are using the latest version
  • You are testing using the non-minified version of html2canvas and checked any potential issues reported in the console

Bug reports:

Hi, when I use html2canvas in an Angular project (v18), I get this warning

[WARNING] Module 'html2canvas' used by 'x' is not ESM

Specifications:

  • html2canvas version tested with:1.4.1
  • Browser & version: node 22.7
  • Operating system: ubuntu 22

When I add the following lines to package.json , the warning stops appearing, is this correct?

   "exports": {
    ".": {
      "types": "./dist/types/index.d.ts",
      "import": "./dist/html2canvas.esm.js",
      "require": "./dist/html2canvas.js"
    }
  },
Captura de pantalla 2024-10-07 a la(s) 09 28 06
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