-
-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't apply babel-plugin-transform-runtime inside react-on-rails to w…
…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
1 parent
8920545
commit 89819ab
Showing
4 changed files
with
3 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,5 @@ | |
"presets": ["es2015", "stage-2", "react"], | ||
"plugins": [ | ||
"transform-flow-strip-types", | ||
"transform-runtime" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters