fix: fix jest breaking with new swc setting (#7149)

This commit is contained in:
Nate Wienert 2023-08-11 10:53:48 -10:00 committed by GitHub
parent 1291887049
commit 94015b279c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
.swcrc

@ -1,10 +1,13 @@
{ {
"$schema": "https://json.schemastore.org/swcrc", "$schema": "https://json.schemastore.org/swcrc",
// has to duplicate from package.json, see swc issue: https://swc.rs/docs/configuration/compilation#env // has to duplicate from package.json, see swc issue: https://swc.rs/docs/configuration/compilation#env
"env": { // this breaks jest because jest is setting target for some reason
"targets": "> 0.5%, not dead" // "env": {
}, // "targets": "> 0.5%, not dead"
// },
"jsc": { "jsc": {
// without this swc breaks WalletConnect class super() call
"target": "es2020",
"keepClassNames": true, "keepClassNames": true,
"experimental": { "experimental": {
"plugins": [ "plugins": [