You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
metu.life/babel.config.js

71 lines
1.3 KiB

module.exports = (api) => {
const env = api.env();
const reactOptions = {
development: false,
};
const envOptions = {
loose: true,
modules: false,
debug: false,
};
const config = {
presets: [
['@babel/react', reactOptions],
['@babel/env', envOptions],
],
plugins: [
['@babel/proposal-decorators', { legacy: true }],
New Crowdin translations (#11077) * New translations en.json (Persian) [ci skip] * New translations en.yml (Dutch) [ci skip] * New translations simple_form.en.yml (Dutch) [ci skip] * New translations activerecord.en.yml (Dutch) [ci skip] * New translations devise.en.yml (Dutch) [ci skip] * New translations doorkeeper.en.yml (Dutch) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Czech) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.json (Czech) [ci skip] * New translations en.json (Greek) [ci skip] * New translations simple_form.en.yml (Greek) [ci skip] * New translations en.json (Greek) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Persian) [ci skip] * New translations en.json (Persian) [ci skip] * New translations en.yml (Persian) [ci skip] * New translations simple_form.en.yml (Persian) [ci skip] * New translations simple_form.en.yml (Persian) [ci skip] * New translations simple_form.en.yml (Persian) [ci skip] * New translations activerecord.en.yml (Persian) [ci skip] * New translations en.yml (Welsh) [ci skip] * New translations en.yml (Welsh) [ci skip] * New translations en.yml (Welsh) [ci skip] * New translations en.yml (Japanese) [ci skip] * New translations en.yml (Japanese) [ci skip] * New translations en.json (Bengali) [ci skip] * New translations en.json (Chinese Simplified) [ci skip] * New translations en.yml (Chinese Simplified) [ci skip] * New translations simple_form.en.yml (Chinese Simplified) [ci skip] * New translations en.yml (Welsh) [ci skip] * New translations en.yml (Welsh) [ci skip] * New translations simple_form.en.yml (Welsh) [ci skip] * New translations simple_form.en.yml (Welsh) [ci skip] * New translations simple_form.en.yml (Welsh) [ci skip] * New translations activerecord.en.yml (Welsh) [ci skip] * New translations devise.en.yml (Welsh) [ci skip] * New translations en.json (Welsh) [ci skip] * New translations en.yml (Welsh) [ci skip] * New translations simple_form.en.yml (Welsh) [ci skip] * New translations devise.en.yml (Welsh) [ci skip] * New translations doorkeeper.en.yml (Welsh) [ci skip] * New translations en.json (Chinese Simplified) [ci skip] * New translations en.yml (Welsh) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations simple_form.en.yml (Thai) [ci skip] * New translations en.json (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.json (Thai) [ci skip] * New translations en.json (Thai) [ci skip] * New translations en.json (Thai) [ci skip] * New translations en.json (Thai) [ci skip] * New translations en.json (Thai) [ci skip] * New translations en.json (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations activerecord.en.yml (Thai) [ci skip] * New translations devise.en.yml (Thai) [ci skip] * New translations doorkeeper.en.yml (Thai) [ci skip] * New translations simple_form.en.yml (Thai) [ci skip] * New translations en.json (Slovak) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations simple_form.en.yml (Slovak) [ci skip] * New translations devise.en.yml (Slovak) [ci skip] * New translations doorkeeper.en.yml (Thai) [ci skip] * New translations en.yml (Slovak) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations activerecord.en.yml (Thai) [ci skip] * New translations devise.en.yml (Thai) [ci skip] * New translations en.yml (Slovak) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.json (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.json (Arabic) [ci skip] * New translations en.yml (Arabic) [ci skip] * New translations devise.en.yml (Arabic) [ci skip] * New translations doorkeeper.en.yml (Arabic) [ci skip] * New translations doorkeeper.en.yml (Welsh) [ci skip] * New translations doorkeeper.en.yml (German) [ci skip] * New translations doorkeeper.en.yml (German) [ci skip] * New translations doorkeeper.en.yml (German) [ci skip] * New translations en.json (Chinese Simplified) [ci skip] * New translations en.json (Chinese Simplified) [ci skip] * New translations en.json (Chinese Simplified) [ci skip] * New translations en.json (Chinese Simplified) [ci skip] * New translations activerecord.en.yml (Japanese) [ci skip] * New translations devise.en.yml (Japanese) [ci skip] * New translations doorkeeper.en.yml (Japanese) [ci skip] * New translations simple_form.en.yml (Japanese) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations simple_form.en.yml (Thai) [ci skip] * New translations devise.en.yml (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations devise.en.yml (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.yml (Thai) [ci skip] * New translations en.json (Corsican) [ci skip] * New translations en.json (Slovenian) [ci skip] * New translations en.json (Slovenian) [ci skip] * New translations en.json (Slovenian) [ci skip] * New translations en.json (Slovenian) [ci skip] * New translations en.json (Slovenian) [ci skip] * New translations en.json (Slovenian) [ci skip] * New translations en.json (Slovenian) [ci skip] * New translations en.json (Slovenian) [ci skip] * New translations en.yml (Slovak) [ci skip] * New translations en.yml (Slovak) [ci skip] * New translations doorkeeper.en.yml (Slovenian) [ci skip] * New translations doorkeeper.en.yml (Slovenian) [ci skip] * New translations doorkeeper.en.yml (Slovenian) [ci skip] * New translations doorkeeper.en.yml (Slovenian) [ci skip] * New translations activerecord.en.yml (Slovenian) [ci skip] * New translations doorkeeper.en.yml (Slovenian) [ci skip] * New translations en.yml (Japanese) [ci skip] * New translations en.yml (Japanese) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations en.json (Hungarian) [ci skip] * New translations devise.en.yml (Hungarian) [ci skip] * New translations devise.en.yml (Hungarian) [ci skip] * New translations devise.en.yml (Hungarian) [ci skip] * New translations devise.en.yml (Hungarian) [ci skip] * New translations devise.en.yml (Hungarian) [ci skip] * New translations doorkeeper.en.yml (Hungarian) [ci skip] * New translations simple_form.en.yml (Hungarian) [ci skip] * New translations doorkeeper.en.yml (Hungarian) [ci skip] * New translations simple_form.en.yml (Hungarian) [ci skip] * New translations simple_form.en.yml (Hungarian) [ci skip] * New translations simple_form.en.yml (Hungarian) [ci skip] * New translations simple_form.en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.json (Arabic) [ci skip] * New translations en.yml (Arabic) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.json (Spanish) [ci skip] * New translations en.yml (Spanish) [ci skip] * New translations en.json (Basque) [ci skip] * New translations en.yml (Basque) [ci skip] * New translations en.yml (Slovak) [ci skip] * New translations en.yml (Slovak) [ci skip] * New translations en.yml (Slovak) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations en.yml (Hungarian) [ci skip] * New translations activerecord.en.yml (Hungarian) [ci skip] * i18n-tasks normalize * yarn manage:translations
5 years ago
['react-intl', { messagesDir: './build/messages' }],
'preval',
],
overrides: [
{
test: /tesseract\.js/,
presets: [
['@babel/env', { ...envOptions, modules: 'commonjs' }],
],
},
],
};
switch (env) {
case 'production':
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':
reactOptions.development = true;
envOptions.debug = true;
break;
case 'test':
envOptions.modules = 'commonjs';
break;
}
return config;
};