793b0513eb
* Translated using Weblate (Occitan) Currently translated at 95.7% (780 of 815 strings) Translation: Mastodon/Backend Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/backend/oc/ * Translated using Weblate (Greek) Currently translated at 100,0% (382 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/el/ * Translated using Weblate (Greek) Currently translated at 100,0% (4 of 4 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/el/ * Translated using Weblate (Greek) Currently translated at 100.0% (382 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/el/ * Translated using Weblate (French) Currently translated at 100.0% (382 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/fr/ * Translated using Weblate (French) Currently translated at 100.0% (4 of 4 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/fr/ * Translated using Weblate (French) Currently translated at 100.0% (66 of 66 strings) Translation: Mastodon/Devise Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/devise/fr/ * Translated using Weblate (Dutch) Currently translated at 100,0% (4 of 4 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/nl/ * Translated using Weblate (Galician) Currently translated at 100,0% (4 of 4 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/gl/ * Translated using Weblate (Dutch) Currently translated at 100,0% (382 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/nl/ * Translated using Weblate (Galician) Currently translated at 100,0% (382 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/gl/ * Translated using Weblate (Slovak) Currently translated at 100.0% (382 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/sk/ * Translated using Weblate (Arabic) Currently translated at 97.4% (372 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/ar/ * Translated using Weblate (French) Currently translated at 100.0% (382 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/fr/ * Translated using Weblate (Thai) Currently translated at 75.4% (288 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/th/ * Translated using Weblate (Slovak) Currently translated at 100.0% (4 of 4 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/sk/ * Translated using Weblate (German) Currently translated at 100,0% (4 of 4 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/de/ * Translated using Weblate (Slovak) Currently translated at 100,0% (4 of 4 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/sk/ * Translated using Weblate (Kazakh) Currently translated at 100,0% (4 of 4 strings) Translation: Mastodon/Activerecord Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/activerecord/kk/ * Translated using Weblate (Persian) Currently translated at 100.0% (382 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/fa/ * Translated using Weblate (Kazakh) Currently translated at 99.0% (378 of 382 strings) Translation: Mastodon/React Translate-URL: https://weblate.joinmastodon.org/projects/mastodon/frontend/kk/ * i18n-tasks normalize * yarn manage:translations * Fix empty string in Occitan
66 lines
1.3 KiB
JavaScript
66 lines
1.3 KiB
JavaScript
module.exports = (api) => {
|
|
const env = api.env();
|
|
|
|
const envOptions = {
|
|
debug: false,
|
|
loose: true,
|
|
modules: false,
|
|
};
|
|
|
|
const config = {
|
|
presets: [
|
|
'@babel/react',
|
|
['@babel/env', envOptions],
|
|
],
|
|
plugins: [
|
|
'@babel/syntax-dynamic-import',
|
|
['@babel/proposal-object-rest-spread', { useBuiltIns: true }],
|
|
['@babel/proposal-decorators', { legacy: true }],
|
|
'@babel/proposal-class-properties',
|
|
['react-intl', { messagesDir: './build/messages/' }],
|
|
'preval',
|
|
],
|
|
};
|
|
|
|
switch (env) {
|
|
case 'production':
|
|
envOptions.debug = false;
|
|
config.plugins.push(...[
|
|
'lodash',
|
|
[
|
|
'transform-react-remove-prop-types',
|
|
{
|
|
mode: 'remove',
|
|
removeImport: true,
|
|
additionalLibraries: [
|
|
'react-immutable-proptypes',
|
|
],
|
|
},
|
|
],
|
|
'@babel/transform-react-inline-elements',
|
|
[
|
|
'@babel/transform-runtime',
|
|
{
|
|
helpers: true,
|
|
regenerator: false,
|
|
useESModules: true,
|
|
},
|
|
],
|
|
]);
|
|
break;
|
|
case 'development':
|
|
envOptions.debug = true;
|
|
config.plugins.push(...[
|
|
'@babel/transform-react-jsx-source',
|
|
'@babel/transform-react-jsx-self',
|
|
]);
|
|
break;
|
|
case 'test':
|
|
envOptions.modules = 'commonjs';
|
|
break;
|
|
}
|
|
|
|
return config;
|
|
};
|
|
|