From aa097041462cd690ba26bb4288d858d681a94725 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Tue, 12 Feb 2019 18:37:34 +0100 Subject: [PATCH] add configuration to run extraction of messages for translation --- babel.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/babel.config.js b/babel.config.js index 63b60eee..d35cc679 100644 --- a/babel.config.js +++ b/babel.config.js @@ -44,6 +44,18 @@ module.exports = (api) => { presets.push('jest'); } + if (api.env('translations')) { + plugins.push( + [ + 'react-intl', + { + messagesDir: './translations/extractedMessages/', + extractSourceLocation: true, + }, + ], + ); + } + return { presets, plugins,