Skip to content

Commit e6e15c4

Browse files
tricknotesjustin808
authored andcommitted
Work on babel 7 with transform-runtime (#1140)
* Revert "Don't apply babel-plugin-transform-runtime inside react-on-rails to work with babel@7 (#1136)" This reverts commit de06717. In general, Webpack doesn't build under `node_modules`. So react-on-rails should support browser compatible build. * Specify babel-runtime as dependencies, not as peerDependencies babel-runtime is not installed Babel 7 environment. (Babel 7 denpends @babel/runtime.) So this should be depended as "dependencies".
1 parent 89c2a7e commit e6e15c4

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Changes since last non-beta release.
1010

1111
#### Fixed
1212
- Ignore Arrays in Rails i18n yml files. [PR 1129](https://github.com/shakacode/react_on_rails/pull/1129) by [vcarel](https://github.com/vcarel).
13+
- Fix to apply transform-runtime. And work with Babel 6 and 7. (Include revert of [PR 1136](https://github.com/shakacode/react_on_rails/pull/1136)) [PR 1140](https://github.com/shakacode/react_on_rails/pull/1140) by [Ryunosuke Sato](https://github.com/tricknotes).
1314

1415
*Please add entries here for your pull requests that are not yet released.*
1516

node_package/.babelrc

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"presets": ["es2015", "stage-2", "react"],
33
"plugins": [
44
"transform-flow-strip-types",
5+
"transform-runtime"
56
]
67
}

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"babel-loader": "^7.1.1",
1313
"babel-plugin-react-transform": "^2.0.2",
1414
"babel-plugin-transform-flow-strip-types": "^6.22.0",
15+
"babel-plugin-transform-runtime": "^6.23.0",
1516
"babel-preset-es2015": "^6.24.1",
1617
"babel-preset-react": "^6.24.1",
1718
"babel-preset-stage-2": "^6.24.1",
18-
"babel-runtime": "^6.25.0",
1919
"babel-tape-runner": "^2.0.1",
2020
"babel-types": "^6.25.0",
2121
"babelify": "^7.3.0",
@@ -40,7 +40,6 @@
4040
"webpack-manifest-plugin": "^1.2.1"
4141
},
4242
"peerDependencies": {
43-
"babel-runtime": ">= 6",
4443
"js-yaml": ">= 3.0.0",
4544
"react": ">= 0.14",
4645
"react-dom": ">= 0.14"
@@ -87,5 +86,7 @@
8786
"url": "https://github.com/shakacode/react_on_rails/issues"
8887
},
8988
"homepage": "https://github.com/shakacode/react_on_rails#readme",
90-
"dependencies": {}
89+
"dependencies": {
90+
"babel-runtime": "6"
91+
}
9192
}

yarn.lock

+7-1
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,12 @@ babel-plugin-transform-regenerator@^6.24.1:
756756
dependencies:
757757
regenerator-transform "^0.10.0"
758758

759+
babel-plugin-transform-runtime@^6.23.0:
760+
version "6.23.0"
761+
resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee"
762+
dependencies:
763+
babel-runtime "^6.22.0"
764+
759765
babel-plugin-transform-strict-mode@^6.24.1:
760766
version "6.24.1"
761767
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
@@ -848,7 +854,7 @@ babel-register@^6.26.0, babel-register@^6.3.13:
848854
mkdirp "^0.5.1"
849855
source-map-support "^0.4.15"
850856

851-
babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.25.0, babel-runtime@^6.26.0:
857+
babel-runtime@6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
852858
version "6.26.0"
853859
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
854860
dependencies:

0 commit comments

Comments
 (0)