Open rusikf opened 10 months ago
I'd love to see a repro case for the problem that you have experienced. It's important to know what exact tools were involved.
Thanks for your response! @Andarist
I have this error during webpack compilation.
ERROR in ./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js 5:25-52
export 'useInsertionEffect' (imported as 'React') was not found in 'react' (possible exports: Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version)
@ ./node_modules/react-select/node_modules/@emotion/react/dist/emotion-react.browser.esm.js 5:0-142 192:2-38 215:2-38 305:2-42
@ ./node_modules/react-select/dist/react-select.esm.js 8:0-47 41:45-58
Source code - /node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js
import * as React from 'react';
var syncFallback = function syncFallback(create) {
return create();
};
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
export { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };
Recap: Code has fallback in declaration of var useInsertionEffect
=> webpack must not raise an error on import * step
, Do you have any ideas?
Thanks! :wink:
I need a full runnable/clonable repro case to debug this.
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
@emotion/use-insertion-effect-with-fallbacks@1.0.1
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.