load remote translations

This commit is contained in:
s2
2019-04-16 09:02:57 +02:00
parent f90d862786
commit f4fb72f363
22 changed files with 727 additions and 27 deletions

31
node_modules/i18next-xhr-backend/rollup.config.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
import babel from 'rollup-plugin-babel';
import uglify from 'rollup-plugin-uglify';
import nodeResolve from 'rollup-plugin-node-resolve';
import { argv } from 'yargs';
const format = argv.format || argv.f || 'iife';
const compress = argv.uglify;
const babelOptions = {
exclude: 'node_modules/**',
presets: [['es2015', { modules: false }], 'stage-0'],
babelrc: false
};
const dest = {
amd: `dist/amd/i18nextXHRBackend${compress ? '.min' : ''}.js`,
umd: `dist/umd/i18nextXHRBackend${compress ? '.min' : ''}.js`,
iife: `dist/iife/i18nextXHRBackend${compress ? '.min' : ''}.js`
}[format];
export default {
entry: 'src/index.js',
format,
plugins: [
babel(babelOptions),
nodeResolve({ jsnext: true })
].concat(compress ? uglify() : []),
moduleName: 'i18nextXHRBackend',
//moduleId: 'i18nextXHRBackend',
dest
};