diff options
author | Tiago Rodrigues <tmcrodrigues@gmail.com> | 2015-11-20 17:46:04 +0300 |
---|---|---|
committer | Tiago Rodrigues <tmcrodrigues@gmail.com> | 2015-11-20 17:46:04 +0300 |
commit | c267b8d8da52efdd54a9fa12ac85e0bcee94c20d (patch) | |
tree | 973d15e0fcae0c6986707a9157b1a62cded56f4b /README.md | |
parent | a4fc3a852d1749cb6491c7a337d4ad4720248df6 (diff) |
Add a note about babel-plugin-rewire
See #62
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -188,6 +188,11 @@ myModule.__set__("console", { This replaces `console` just inside `myModule`. That is, because rewire is using `eval()` to turn the key expression into an assignment. Hence, calling `myModule.__set__("console.log", fn)` modifies the `log` function on the *global* `console` object. +**Transpiled ES6 modules**<br> +If you are using Babel with ES6 rewire does not know how to mock the top level references in a module because Babel has remapped them (see #62). + +In this case you should use [babel-plugin-rewire](https://github.com/speedskater/babel-plugin-rewire) instead. + <br /> API |