Skip to content

Commit

Permalink
chore: remove unnecessary babel plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pwltr committed Dec 19, 2024
1 parent bfa857b commit 491fccd
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
const { types } = require('@babel/core');
const { E2E_TESTS } = process.env;

module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
// Support bigint literal `0n`
transformBigIntLiteral,
// Support `for await () {}`
'@babel/plugin-proposal-async-generator-functions',
[
Expand All @@ -25,17 +22,3 @@ module.exports = {
},
},
};

// Copied from unsupported https://github.com/babel/babel/pull/10102/files
function transformBigIntLiteral() {
return {
visitor: {
BigIntLiteral(path) {
const bigintCall = types.callExpression(types.identifier('BigInt'), [
types.stringLiteral(path.node.value),
]);
path.replaceWith(bigintCall);
},
},
};
}

0 comments on commit 491fccd

Please sign in to comment.