Skip to content

Commit

Permalink
chore: add jest config to transpile squid lib
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Nov 15, 2023
1 parent 58a6d82 commit ca17f11
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions webapp/config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
const { override, babelInclude } = require('customize-cra')
const path = require('path')

module.exports = override(
babelInclude([
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules/react-virtualized-auto-sizer'),
path.resolve(
__dirname,
'node_modules/decentraland-connect/node_modules/@walletconnect'
),
path.resolve('node_modules/@metamask/utils/node_modules/superstruct'),
path.resolve(__dirname, 'node_modules/@walletconnect'),
path.resolve(__dirname, 'node_modules/@dcl/single-sign-on-client'),
path.resolve(__dirname, 'node_modules/@0xsquid/sdk'),
path.resolve(__dirname, 'node_modules/@cosmjs'),
path.resolve(__dirname, 'node_modules/cosmjs-types'),
path.resolve(__dirname, 'node_modules/ethers-multicall-provide'),
path.resolve(__dirname, 'node_modules/@noble')
])
)
module.exports = {
jest: config => {
config.transformIgnorePatterns = [
'node_modules/?!@0xsquid|eccrypto|libsodium-wrappers-sumo'
]
config.moduleNameMapper = {
'@dcl/single-sign-on-client': 'identity-obj-proxy'
}
return config
},
...override(
babelInclude([
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules/react-virtualized-auto-sizer'),
path.resolve(
__dirname,
'node_modules/decentraland-connect/node_modules/@walletconnect'
),
path.resolve('node_modules/@metamask/utils/node_modules/superstruct'),
path.resolve(__dirname, 'node_modules/@walletconnect'),
path.resolve(__dirname, 'node_modules/@dcl/single-sign-on-client'),
path.resolve(__dirname, 'node_modules/@0xsquid/sdk'),
path.resolve(__dirname, 'node_modules/@cosmjs'),
path.resolve(__dirname, 'node_modules/cosmjs-types'),
path.resolve(__dirname, 'node_modules/ethers-multicall-provide'),
path.resolve(__dirname, 'node_modules/@noble')
])
)
}

0 comments on commit ca17f11

Please sign in to comment.