You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're trying to upgrade @rjsf/core, @rjsf/utils and @rjsf/validator-ajv8 from 5.8.2 to 5.14.1. However, we run into a bundle error when importing @rjsf/utils with ESM, because Yarn cannot resolve tslib:
.yarn/__virtual__/@rjsf-utils-virtual-221548ebb0/0/cache/@rjsf-utils-npm-5.14.1-5c751cec25-68b230fb55.zip/node_modules/@rjsf/utils/lib/schema/getMatchingOption.js:1:23:
1 │ import { __rest } from "tslib";
Expected Behavior
Ideally we should be able to import @rjsf/utils without error.
Prerequisites
What theme are you using?
core
Version
5.x
Current Behavior
We're trying to upgrade
@rjsf/core
,@rjsf/utils
and@rjsf/validator-ajv8
from 5.8.2 to 5.14.1. However, we run into a bundle error when importing@rjsf/utils
with ESM, because Yarn cannot resolvetslib
:Expected Behavior
Ideally we should be able to import
@rjsf/utils
without error.I dug into it a little bit and discovered that
@rjsf/utils@5.14.1
compiles its files into.js
usingtsc
. The package then setslib/index.js
as themodule
field., which eventually points to a file that hastslib
injected.On the other hand, version 5.8.2 uses the compiled ESM file instead.
Yarn protects us from ghost dependencies, which is why we get the error.
I believe
@rjsf
could either:module
field fromdist/utils.esm.js
tolib/index.js
.tslib
to the package's dependencies, if you want to continue using TypeScript-compiled files.Steps To Reproduce
Import
@rjsf/utils
with Yarn as the package manager.Example repro: https://codesandbox.io/s/condescending-platform-q8wtk8?file=/src/index.js
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: