vality.dev/babel-extract.config.js
2022-12-27 16:00:53 +06:00

25 lines
595 B
JavaScript

module.exports = {
presets: ["babel-preset-gatsby"],
plugins: [
[
"i18next-extract",
{
locales: ["en", "ru"],
keySeparator: null,
nsSeparator: null,
keyAsDefaultValue: ["en"],
useI18nextDefaultValue: ["en"],
discardOldKeys: true,
outputPath: "locales/{{locale}}/{{ns}}.json",
customTransComponents: [["gatsby-plugin-react-i18next", "Trans"]],
},
],
],
overrides: [
{
test: [`**/*.ts`, `**/*.tsx`],
plugins: [[`@babel/plugin-transform-typescript`, { isTSX: true }]],
},
],
};