Skip to content

Commit 36c938c

Browse files
authored
fix(integration): Don't mangle localforage internals (#5534)
1 parent 42d0f50 commit 36c938c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

rollup/plugins/bundlePlugins.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,16 @@ export function makeTerserPlugin() {
9292
properties: {
9393
// allow mangling of private field names...
9494
regex: /^_[^_]/,
95-
// ...except for `_experiments`, which we want to remain usable from the outside
96-
reserved: ['_experiments'],
95+
reserved: [
96+
// ...except for `_experiments`, which we want to remain usable from the outside
97+
'_experiments',
98+
// ...except for some localforage internals, which if we replaced them would break the localforage package
99+
// with the error "Error: Custom driver not compliant": https://github.com/getsentry/sentry-javascript/issues/5527.
100+
// Reference for which fields are affected: https://localforage.github.io/localForage/ (ctrl-f for "_")
101+
'_driver',
102+
'_initStorage',
103+
'_support',
104+
],
97105
},
98106
},
99107
output: {

0 commit comments

Comments
 (0)