This is most probably due to this snippet of code in apollo-client:
export function requireReactLazily(): typeof import('react') {
return React || (React = require('react'));
}
I am using plugin-commonjs/node-resolve.
Output format: esm
Expected Behavior
Rollup should bundle React along with apollo-client. And not fail during runtime.
Actual Behavior
App load fails with require is not defined error.
[3.0-beta] Uncaught ReferenceError: require is not defined apollographql/apollo-client#6035
This is most probably due to this snippet of code in apollo-client:
I am using plugin-commonjs/node-resolve.
Output format:
esmExpected Behavior
Rollup should bundle
Reactalong with apollo-client. And not fail during runtime.Actual Behavior
App load fails with
require is not definederror.