Skip to content

After upgrading to Vue3/Vite 8, Console Warning [INVALID_ANNOTATION] core-js #2764

Description

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @microsoft/applicationinsights-core-js@3.4.3 for the project I'm working on.

There may be more but this seems to work by removing the /*#__PURE__*/, there may be a better fix but this works fine locally.

[INVALID_ANNOTATION] A comment "/*#__PURE__*/" in "node_modules/@microsoft/applicationinsights-core-js/dist-es5/ext/extUtils.js" contains an annotation that Rolldown cannot interpret due to the position of the comment.
    ╭─[ node_modules/@microsoft/applicationinsights-core-js/dist-es5/ext/extUtils.js:54:28 ]
    │
 54 │ var uInt8ArraySupported = (/*#__PURE__*/null);
    │                            ──────┬──────  
    │                                  ╰──────── comment ignored due to position
    │ 
    │ Help: For more information on how to use pure annotations correctly, check the documentation: https://rolldown.rs/in-depth/dead-code-elimination#pure
────╯

Here is the diff that solved my problem:

diff --git a/node_modules/@microsoft/applicationinsights-core-js/dist-es5/ext/extUtils.js b/node_modules/@microsoft/applicationinsights-core-js/dist-es5/ext/extUtils.js
index a42635f..ff50e84 100644
--- a/node_modules/@microsoft/applicationinsights-core-js/dist-es5/ext/extUtils.js
+++ b/node_modules/@microsoft/applicationinsights-core-js/dist-es5/ext/extUtils.js
@@ -51,7 +51,7 @@ var _fieldTypeEventPropMap = (_a = {},
  * @ignore
  */
 // let _uaDisallowsSameSiteNone = null;
-var uInt8ArraySupported = (/*#__PURE__*/null);
+var uInt8ArraySupported = (null);
 // var _areCookiesAvailable: boolean | undefined;
 /**
  * Checks if document object is available

This issue body was partially generated by patch-package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions