dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.16k stars 9.92k forks source link

`/*#__PURE__*/` annotations dont work well with Vite / Rollup #55286

Open lukedukeus opened 4 months ago

lukedukeus commented 4 months ago

Is there an existing issue for this?

Describe the bug

running vite build thows warnings about pure annotations

1>  node_modules/@microsoft/signalr/dist/esm/Utils.js (189:0): A comment
1>
1>  "/*#__PURE__*/"
1>
1>  in "node_modules/@microsoft/signalr/dist/esm/Utils.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

daomtthuan commented 4 months ago

+1

It was fixed at this https://github.com/rollup/rollup/issues/5324

hmm, or not 🤔

drewkill32 commented 4 months ago

I'm having the issue and it it a bug in the javascript signalR client. Rollup expects the "/#PURE/" annotations on function calls or constructor invocation, not on module function declaration. Rollup REPL

I created PR #55496

mityaua commented 2 months ago

Still actual.