This updates the interop setting in Rollup to correctly identify default imports again when transpiled to commonjs by switching it to auto, and allowing it to add a check for __esModule to the require statement of @urql/storage-rn’s imports specifically in CommonJS.
This PR also updates all React imports to use namespace imports in ESM .es.js output and to assume defaultOnly for interop.
Set of changes
Update React imports to import * as React from 'react' namespace imports
Update interop setting in Rollup to auto, except for React
Resolves #3250
Summary
This updates the interop setting in Rollup to correctly identify default imports again when transpiled to
commonjs
by switching it toauto
, and allowing it to add a check for__esModule
to therequire
statement of@urql/storage-rn
’s imports specifically in CommonJS.This PR also updates all React imports to use namespace imports in ESM
.es.js
output and to assumedefaultOnly
for interop.Set of changes
import * as React from 'react'
namespace importsinterop
setting in Rollup toauto
, except for React