Unexpected output
luizbills opened this issue · comments
Luiz Bills commented
The bundler do not remove that "unused" AudioContext instance. Why?
Evan Wallace commented
That’s likely because esbuild doesn’t know that new AudioContext()
is side-effect free.
Luiz Bills commented
That’s likely because esbuild doesn’t know that
new AudioContext()
is side-effect free.
make sense!
There are something I can do?
hyrious commented
You can mark your function-call (including new XXX()
) as side-effect free with /*@__PURE__*/
. Playground Link
Luiz Bills commented
You can mark your function-call (including
new XXX()
) as side-effect free with/*@__PURE__*/
.
thanks!