Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Rodrigues <tmcrodrigues@gmail.com>2015-11-20 17:46:04 +0300
committerTiago Rodrigues <tmcrodrigues@gmail.com>2015-11-20 17:46:04 +0300
commitc267b8d8da52efdd54a9fa12ac85e0bcee94c20d (patch)
tree973d15e0fcae0c6986707a9157b1a62cded56f4b /README.md
parenta4fc3a852d1749cb6491c7a337d4ad4720248df6 (diff)
Add a note about babel-plugin-rewire
See #62
Diffstat (limited to 'README.md')
-rw-r--r--README.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2e1a89a..8fe92a4 100644
--- a/README.md
+++ b/README.md
@@ -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