Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

babel.config.js

12 lines588 Bytes

1const { precomputeMessages, lowerTaggedTemplates } = require("@generaltranslation/compiler/babel");
2​
3module.exports = function (api) {
4 api.cache(true);
5 return {
6 // GT's plugins run before the preset's compiler. The first hashes each message at build time,
7 // which Hermes is slow to do on a phone. The second turns tagged templates into calls: React
8 // Compiler skips a component that holds a tagged template with a value in it.
9 plugins: [precomputeMessages, lowerTaggedTemplates],
10 presets: [["babel-preset-expo", { unstable_transformImportMeta: true }]],
11 };
12};