Skip to content

Commit

Permalink
Don't apply babel-plugin-transform-runtime inside react-on-rails to w…
Browse files Browse the repository at this point in the history
…ork with babel@7

It should be applied by user land.

Why?
The generated code depends on built babel's version.
It means that user couldn' build their code with babel@7 that depends on react-on-rails built by babel@6.

For example, babel-plugin-transform-runtime (babel 6) generates the
following code.
``` js
var _assign = require('babel-runtime/core-js/object/assign');
```

However @babel/plugin-transform-runtime (babel 7) expects the
path that beginning of `@babel/runtime/`.

The change allows to use react-on-rails on babel@7.
  • Loading branch information
tricknotes committed Aug 21, 2018
1 parent 8920545 commit 89819ab
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Changes since last non-beta release.

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

#### Fixed
- Don't apply babel-plugin-transform-runtime inside react-on-rails to work with babel 7. [PR 1136](https://github.com/shakacode/react_on_rails/pull/1136) by [Ryunosuke Sato](https://github.com/tricknotes)

### [11.1.2] - 2018-08-18

#### Fixed
Expand Down
1 change: 0 additions & 1 deletion node_package/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
"presets": ["es2015", "stage-2", "react"],
"plugins": [
"transform-flow-strip-types",
"transform-runtime"
]
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"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",
Expand Down
6 changes: 0 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -756,12 +756,6 @@ 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

0 comments on commit 89819ab

Please sign in to comment.