swc
swc copied to clipboard
feat(es/minifier): mark some builtin functions pure.
Description:
Can we have those list also in swc minifier? (itself)
Originally posted by @kdy1 in https://github.com/swc-project/swc/issues/6840#issuecomment-1398415208
BREAKING CHANGE:
Related issue (if exists):
The PR relies on code in #6840.
I think I misunderstand the usage of the esbuild's list.
Note that membership in this list says nothing about whether calling any of these functions has any side effects. It only says something about referencing these function without calling them (doesn't have side effects).
But still, there are indeed some expressions in the list that are calling without side effects. I need to tweak the list.