Skip to content
This repository was archived by the owner on Jan 4, 2018. It is now read-only.

Commit c74d845

Browse files
committed
Adjust react-intl plugin
1 parent 59b5b87 commit c74d845

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.babelrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"plugins": [ "transform-decorators", "transform-runtime" ],
2+
"plugins": ["transform-runtime"],
33
"presets": [ "es2015", "react", "stage-0" ],
44
"env": {
55
"development": {
@@ -18,6 +18,14 @@
1818
]
1919
}]
2020
]
21+
},
22+
"i18n": {
23+
"plugins": [
24+
[ "react-intl", {
25+
"messagesDir": "./_translations",
26+
"enforceDescriptions": true
27+
}]
28+
]
2129
}
2230
}
2331
}

.babelrc.i18n

Lines changed: 0 additions & 10 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"scripts": {
1616
"build": "npm run clean && npm run lint && webpack",
17-
"build:i18n": "rimraf _translations && babel --quiet --babelrc .babelrc.i18n lib > /dev/null",
17+
"build:i18n": "rimraf _translations && BABEL_ENV=i18n babel --quiet --plugins react-intl lib",
1818
"build:i18n:langs": "npm run build:i18n && babel-node scripts/i18nToXliff.js",
1919
"clean": "rimraf dist",
2020
"deploy": "npm run dist && gh-pages -d dist",

0 commit comments

Comments
 (0)