ApplicationInsights-JS icon indicating copy to clipboard operation
ApplicationInsights-JS copied to clipboard

[BUG] Consuming dist-esm instead of dist

Open itsmedardan opened this issue 4 years ago • 1 comments

Description/Screenshot I'm using version 2.7.3, in production, it tries to consume dist-esm instead of dist. Any help is appreciated. Steps to Reproduce

  • OS/Browser:
  • SDK Version [e.g. 22]:
  • How you initialized the SDK:

Expected behavior

Additional context Add any other context about the problem here.

itsmedardan avatar Feb 08 '22 12:02 itsmedardan

It is going to be dependent on how you are consuming the package, what type of package you are creating and which packaging system you are using.

The package.json identifies the entry points based on the types

    "main": "dist/applicationinsights-web.js",
    "module": "dist-esm/applicationinsights-web.js",

module defines the ES6 module entry point while main defines the general entry point https://stackoverflow.com/questions/42708484/what-is-the-module-package-json-field-for

MSNev avatar Feb 08 '22 17:02 MSNev

Thank you for your help @MSNev! We are using a custom transpiler and tree-shaking which imported the wrong package. Is no working. Will close issue.

itsmedardan avatar Nov 21 '22 13:11 itsmedardan

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Nov 22 '23 00:11 github-actions[bot]