We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
with-apollo
Loading the with-apollo example in IE11 has the errors below:
SCRIPT438: Object doesn't support property or method 'assign' File: _app.js, Line: 39168, Column: 17
I added a polyfill for Object.assign, and I get another error:
Object.assign
SCRIPT5007: Unable to get property 'get' of undefined or null reference
Steps to reproduce the behavior, please provide code snippets or a repository:
Load with-apollo in IE11
Should see the error about Object.assign
Add client/polyfills.js file
client/polyfills.js
// client/polyfills.js import "core-js/fn/object/assign";
Add next.config.js file
next.config.js
// next.config.js const withTM = require("next-plugin-transpile-modules"); module.exports = { transpileModules: ["react-apollo"], webpack: config => { const originalEntry = config.entry; config.entry = async () => { const entries = await originalEntry(); if ( entries["main.js"] && !entries["main.js"].includes("./client/polyfills.js") ) { entries["main.js"].unshift("./client/polyfills.js"); } return entries; }; return config; } };
Object.assign error is gone but now the browser console displays the error Unable to get property 'get' of undefined or null reference
Unable to get property 'get' of undefined or null reference
App is stuck in loading state
with-apollo example should be fully functional and display the fully loaded state with no console errors in IE11.
What I'm seeing after polyfilling:
I also tried transpiling react-apollo and apollo-boost using next-plugin-transpile-modules but that didn't help.
react-apollo
apollo-boost
next-plugin-transpile-modules
The text was updated successfully, but these errors were encountered:
I experience the same bug. As a temporary workaround I installed apollo-cache-inmemory@1.2.10 and manually used in in init-apollo.js like this:
apollo-cache-inmemory@1.2.10
init-apollo.js
import { ApolloClient, HttpLink } from 'apollo-boost'; import { InMemoryCache } from 'apollo-cache-inmemory'; ...
The problem seems to appear from apollo-cache-inmemory@1.3.0 and newer so I guess it would be a good idea to open an issue at their project.
apollo-cache-inmemory@1.3.0
Sorry, something went wrong.
It's not a Next.js issue: apollographql/apollo-client#4024.
Let's close this then, as it's tracked in apollographql/apollo-client#4024
No branches or pull requests
Examples bug report
Example name
with-apollo
Describe the bug
Loading the
with-apollo
example in IE11 has the errors below:I added a polyfill for
Object.assign
, and I get another error:To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Load
with-apollo
in IE11Should see the error about
Object.assign
Add
client/polyfills.js
fileAdd
next.config.js
fileObject.assign
error is gone but now the browser console displays the errorUnable to get property 'get' of undefined or null reference
App is stuck in loading state
Expected behavior
with-apollo
example should be fully functional and display the fully loaded state with no console errors in IE11.Screenshots
What I'm seeing after polyfilling:
System information
Additional context
I also tried transpiling
react-apollo
andapollo-boost
usingnext-plugin-transpile-modules
but that didn't help.The text was updated successfully, but these errors were encountered: