-
Notifications
You must be signed in to change notification settings - Fork 18
caches collides with the Browser API #492
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
Comments
I've got the same issue. I'll follow this. |
Renaming the variable of cache variable in the bundle.cjs.js and bundle.esm.js solves it for me. Line 111 in 0f17708
Afterwards we make a patch using: patch-package optimism Hope this helps. |
Renames the `caches` variable because it interferes with the global browser API. Fixes benjamn#492
Revisiting this problem, I think I probably made the mistake of loading an ESM bundle as |
In one of our projects we use
@apollo/client
wich itself includes this package. After bundling as ES module, there is a top-level variablecaches
that seems to collide with the one in the Browser's API.So, using the optimism's ES module in a browser with
type=module
doesn't work. Is that the correct behaviour?The text was updated successfully, but these errors were encountered: