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

Rollup Error with generated /*#__PURE__*/ comments #65

Open
jhpaige opened this issue Dec 4, 2024 · 0 comments
Open

Rollup Error with generated /*#__PURE__*/ comments #65

jhpaige opened this issue Dec 4, 2024 · 0 comments

Comments

@jhpaige
Copy link

jhpaige commented Dec 4, 2024

Rollup doesn't know what to do when /*#__PURE__*/ comments in this package are before return instead of before the function. For example:

THIS:
/*#__PURE__*/ return function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var s=e.prototype;

returns this error:
../../node_modules/acorn-typescript/lib/index.mjs (1:14760): A comment

"/*#__PURE__*/"

in "../../node_modules/acorn-typescript/lib/index.mjs" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.

THEORY -> RETURN BELOW EXAMPLE INSTEAD FOR MINIFIED FILES? Gets rid of the errors when I test it:
return /*#__PURE__*/ function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var s=e.prototype;

Maybe this has to do with microbundle being outdated? Not sure if it's that or if it's problematic code here.

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