-
Notifications
You must be signed in to change notification settings - Fork 82
getting importAssertions error #196
Comments
Hey @5war00p, thanks for bringing this up. I added a note in README about it. Can't say much about CRA support unfortunately. It's known to work in Vite 4+ and Rollup 3+, can't say much outside that. |
Do you think adding the Babel config for importAssertions into the project would work? using below package
Refernce: https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions |
Hmm, that would also require adding babel as dependency? |
Yes. But there is another approach to solve this issue. I followed the error messages and updated tsconfig of the
Anyway current target is As the typescript version in the package is >4.7 we should be using |
As
ethcall
is usingassert
keyword insidelib/call.js
andlib/calls.js
to import ABI's. Using ethcall in typescript project givingimportAssertions
error. It's aCRA
which is customized usingreact-app-rewired
The solution is suggested in the error itself, which is adding a Babel plugin called
@babel/plugin-syntax-import-assertions
Or are there any other solutions for this?
The text was updated successfully, but these errors were encountered: