Skip to content

Commit

Permalink
optimize bundle size for es, cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamuhl committed Oct 1, 2018
1 parent 2d4c600 commit 54e4eff
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 187 deletions.
9 changes: 7 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"env": {
"development": {
"presets": ["@babel/preset-env", "@babel/react"]
"presets": ["@babel/preset-env", "@babel/react"],
"plugins": ["@babel/plugin-transform-runtime"]
},
"jsnext": {
"presets": [["@babel/preset-env", { "modules": false }], "@babel/react"]
"presets": [
["@babel/preset-env", { "modules": false, "useBuiltIns": false }],
"@babel/react"
],
"plugins": ["@babel/plugin-transform-runtime"]
}
}
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 8.0.1

- use @babel/plugin-transform-runtime

### 8.0.0

- translate HOC was renamed to "withNamespaces" as it controls which namespaces should be loaded
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-i18next",
"version": "8.0.0",
"version": "8.0.1",
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
"main": "dist/commonjs/index.js",
"jsnext:main": "dist/es/index.js",
Expand All @@ -23,6 +23,7 @@
"url": "https://github.com/i18next/react-i18next.git"
},
"dependencies": {
"@babel/runtime": "^7.1.2",
"create-react-context": "0.2.3",
"hoist-non-react-statics": "3.0.1",
"html-parse-stringify2": "2.0.1",
Expand All @@ -34,6 +35,7 @@
"@babel/plugin-proposal-async-generator-functions": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
Expand Down
Loading

0 comments on commit 54e4eff

Please sign in to comment.