Skip to content

fix(integration): Don't mangle localforage internals #5534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions rollup/plugins/bundlePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down