[英]ember-intl adds 600+ json for different languages to the project while building
We are using ember-intl in our projects. 我们在项目中使用ember-intl。 But while we are building our projects with
ember build --environment=production
, ember-intl adds 600+ translations files. 但是,当我们使用
ember build --environment=production
项目时,ember-intl会添加600多个翻译文件。
I want to pick the languages that we support and I don't want to add 17mb of json files those we don't need. 我想选择我们支持的语言,也不想添加17mb不需要的json文件。
Is there any configuration for that? 有什么配置吗?
Include the below in config/environment.js
. 将以下内容包含在
config/environment.js
。
intl: {
locales: ['en-us', 'fr-fr']
}
included sample environment.js file would be, 包括示例环境.js文件,
var ENV = {
modulePrefix: 'kuman-appname',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
},
intl: {
locales: ['en-us', 'fr-fr']
}
}
https://github.com/jasonmit/ember-intl/wiki/Intl.js-Polyfill#loading-files-from-assets https://github.com/jasonmit/ember-intl/wiki/Intl.js-Polyfill#loading-files-from-assets
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.