Opt out of core-js-bundle polyfill?
LeviticusMB opened this issue · 2 comments
LeviticusMB commented
I'm using latest core-js-bundle/minified.js
in a very old runtime (Crosswalk, Chromium 53; previously, we used core-js/client/shim.js
from 2.6.12).
Unfortunately, JSON.stringify
is unusable slow. Is there a way to opt out of only that polyfill in this situation?
zloirock commented
Sure.
- You could use
core-js-builder
and excludees.json.stringify
andesnext.json.raw-json
. - You could use
core-js/configurator
(from another copy ofcore-js
since it's missed incore-js-bundle
) and specify it inuseNative
.
zloirock commented
Hmm... I forgot that for a legacy reason, before the next major release, es.symbol
depends on es.json.stringify
, so the first way also requires the exclusion of the Symbol
constructor polyfill.
As an option, you could try to exclude only esnext.json.raw-json
that should make JSON.stringify
faster without an extra wrapper.