diff --git a/rollup/plugins/bundlePlugins.js b/rollup/plugins/bundlePlugins.js index 7d4c7a9023cd..c2c65d8a1a11 100644 --- a/rollup/plugins/bundlePlugins.js +++ b/rollup/plugins/bundlePlugins.js @@ -92,8 +92,16 @@ export function makeTerserPlugin() { properties: { // allow mangling of private field names... regex: /^_[^_]/, - // ...except for `_experiments`, which we want to remain usable from the outside - reserved: ['_experiments'], + reserved: [ + // ...except for `_experiments`, which we want to remain usable from the outside + '_experiments', + // ...except for some localforage internals, which if we replaced them would break the localforage package + // with the error "Error: Custom driver not compliant": https://github.com/getsentry/sentry-javascript/issues/5527. + // Reference for which fields are affected: https://localforage.github.io/localForage/ (ctrl-f for "_") + '_driver', + '_initStorage', + '_support', + ], }, }, output: {