evanw / esbuild

An extremely fast bundler for the web

Home Page:https://esbuild.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected output

luizbills opened this issue · comments

That’s likely because esbuild doesn’t know that new AudioContext() is side-effect free.

That’s likely because esbuild doesn’t know that new AudioContext() is side-effect free.

make sense!

There are something I can do?

You can mark your function-call (including new XXX()) as side-effect free with /*@__PURE__*/. Playground Link

You can mark your function-call (including new XXX()) as side-effect free with /*@__PURE__*/.

thanks!