Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove i18n from min js
  • Loading branch information
akshay-99 committed Jun 12, 2020
commit 9608b5a7846a154613c9ba9ebb396f6be53b2223
7 changes: 6 additions & 1 deletion src/core/internationalization.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import i18next from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import resources from '../../translations';

let resources;
// Do not include translations in the minified js
if (typeof IS_MINIFIED === 'undefined') {
resources = require('../../translations').default;
}

/**
* This is our translation function. Give it a key and
Expand Down
4 changes: 3 additions & 1 deletion tasks/build/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ module.exports = function(grunt) {
browseified = browseified
.exclude('../../docs/reference/data.json')
.exclude('../../../docs/parameterData.json')
.ignore('../../translations/index.js');
.exclude('../../translations')
.ignore('i18next')
.ignore('i18next-browser-languagedetector');
}

const babelifyOpts = { plugins: ['static-fs'] };
Expand Down