Skip to content

Commit

Permalink
Work on babel 7 with transform-runtime (#1140)
Browse files Browse the repository at this point in the history
* 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".
  • Loading branch information
tricknotes authored and justin808 committed Sep 12, 2018
1 parent 89c2a7e commit e6e15c4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changes since last non-beta release.

#### Fixed
- Ignore Arrays in Rails i18n yml files. [PR 1129](https://github.com/shakacode/react_on_rails/pull/1129) by [vcarel](https://github.com/vcarel).
- 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).

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

Expand Down
1 change: 1 addition & 0 deletions node_package/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"presets": ["es2015", "stage-2", "react"],
"plugins": [
"transform-flow-strip-types",
"transform-runtime"
]
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"babel-loader": "^7.1.1",
"babel-plugin-react-transform": "^2.0.2",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-runtime": "^6.25.0",
"babel-tape-runner": "^2.0.1",
"babel-types": "^6.25.0",
"babelify": "^7.3.0",
Expand All @@ -40,7 +40,6 @@
"webpack-manifest-plugin": "^1.2.1"
},
"peerDependencies": {
"babel-runtime": ">= 6",
"js-yaml": ">= 3.0.0",
"react": ">= 0.14",
"react-dom": ">= 0.14"
Expand Down Expand Up @@ -87,5 +86,7 @@
"url": "https://github.com/shakacode/react_on_rails/issues"
},
"homepage": "https://github.com/shakacode/react_on_rails#readme",
"dependencies": {}
"dependencies": {
"babel-runtime": "6"
}
}
8 changes: 7 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,12 @@ babel-plugin-transform-regenerator@^6.24.1:
dependencies:
regenerator-transform "^0.10.0"

babel-plugin-transform-runtime@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee"
dependencies:
babel-runtime "^6.22.0"

babel-plugin-transform-strict-mode@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
Expand Down Expand Up @@ -848,7 +854,7 @@ babel-register@^6.26.0, babel-register@^6.3.13:
mkdirp "^0.5.1"
source-map-support "^0.4.15"

babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.25.0, babel-runtime@^6.26.0:
babel-runtime@6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
dependencies:
Expand Down

0 comments on commit e6e15c4

Please sign in to comment.