testnet-onboarding-app/config/jest/babelTransform.js
Adwait Gharpure 60c95659a0
Add support for sending cosmos transactions to laconic wallet (#12)
* Add method for sending tx to wallet

* Setup registry-sdk in onboarding app

* Build message for bond creation

* Get response on signing and broadcasting tx

* Run eject script

* Display snackbar on creating bond

* Add fallback to webpack config file

* Handle review changes

* Handle errors with snackbar
2024-07-04 11:15:18 +05:30

28 lines
519 B
JavaScript

const babelJest = require('babel-jest').default;
const hasJsxRuntime = (() => {
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
return false;
}
try {
require.resolve('react/jsx-runtime');
return true;
} catch (e) {
return false;
}
})();
module.exports = babelJest.createTransformer({
presets: [
[
require.resolve('babel-preset-react-app'),
{
runtime: hasJsxRuntime ? 'automatic' : 'classic',
},
],
],
babelrc: false,
configFile: false,
});